Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
3 * Copyright (C) 2005 Alexey Proskuryakov. 3 * Copyright (C) 2005 Alexey Proskuryakov.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 s.replace(leftSingleQuotationMarkCharacter, '\''); 75 s.replace(leftSingleQuotationMarkCharacter, '\'');
76 s.replace(rightDoubleQuotationMarkCharacter, '"'); 76 s.replace(rightDoubleQuotationMarkCharacter, '"');
77 s.replace(rightSingleQuotationMarkCharacter, '\''); 77 s.replace(rightSingleQuotationMarkCharacter, '\'');
78 // Replace soft hyphen with an ignorable character so that their presence or absence will 78 // Replace soft hyphen with an ignorable character so that their presence or absence will
79 // not affect string comparison. 79 // not affect string comparison.
80 s.replace(softHyphenCharacter, 0); 80 s.replace(softHyphenCharacter, 0);
81 } 81 }
82 82
83 static bool isNonLatin1Separator(UChar32 character) 83 static bool isNonLatin1Separator(UChar32 character)
84 { 84 {
85 ASSERT_ARG(character, character >= 256); 85 DCHECK_GE(character, 256);
86
87 return U_GET_GC_MASK(character) & (U_GC_S_MASK | U_GC_P_MASK | U_GC_Z_MASK | U_GC_CF_MASK); 86 return U_GET_GC_MASK(character) & (U_GC_S_MASK | U_GC_P_MASK | U_GC_Z_MASK | U_GC_CF_MASK);
88 } 87 }
89 88
90 bool isSeparator(UChar32 character) 89 bool isSeparator(UChar32 character)
91 { 90 {
92 static const bool latin1SeparatorTable[256] = { 91 static const bool latin1SeparatorTable[256] = {
93 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
94 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
95 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // space ! " # $ % & ' ( ) * + , - . / 94 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // space ! " # $ % & ' ( ) * + , - . /
96 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, // : ; < = > ? 95 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, // : ; < = > ?
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 if (offset == kNotFound) 404 if (offset == kNotFound)
406 return false; 405 return false;
407 406
408 // Update values of |a| and |b| after comparing. 407 // Update values of |a| and |b| after comparing.
409 a += offset; 408 a += offset;
410 b += offset; 409 b += offset;
411 } 410 }
412 } 411 }
413 412
414 } // namespace blink 413 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp ('k') | third_party/WebKit/Source/wtf/Assertions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698