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

Side by Side Diff: Source/wtf/StringHasher.h

Issue 216313002: Introduce ASSERT_ENABLED macro. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/wtf/DateMath.cpp ('k') | Source/wtf/ThreadRestrictionVerifier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008, 2010, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2010, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return; 67 return;
68 } 68 }
69 69
70 m_pendingCharacter = character; 70 m_pendingCharacter = character;
71 m_hasPendingCharacter = true; 71 m_hasPendingCharacter = true;
72 } 72 }
73 73
74 void addCharacters(UChar a, UChar b) 74 void addCharacters(UChar a, UChar b)
75 { 75 {
76 if (m_hasPendingCharacter) { 76 if (m_hasPendingCharacter) {
77 #if !ASSERT_DISABLED 77 #if ASSERT_ENABLED
78 m_hasPendingCharacter = false; 78 m_hasPendingCharacter = false;
79 #endif 79 #endif
80 addCharactersAssumingAligned(m_pendingCharacter, a); 80 addCharactersAssumingAligned(m_pendingCharacter, a);
81 m_pendingCharacter = b; 81 m_pendingCharacter = b;
82 #if !ASSERT_DISABLED 82 #if ASSERT_ENABLED
83 m_hasPendingCharacter = true; 83 m_hasPendingCharacter = true;
84 #endif 84 #endif
85 return; 85 return;
86 } 86 }
87 87
88 addCharactersAssumingAligned(a, b); 88 addCharactersAssumingAligned(a, b);
89 } 89 }
90 90
91 template<typename T, UChar Converter(T)> void addCharactersAssumingAligned(c onst T* data, unsigned length) 91 template<typename T, UChar Converter(T)> void addCharactersAssumingAligned(c onst T* data, unsigned length)
92 { 92 {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 unsigned m_hash; 287 unsigned m_hash;
288 bool m_hasPendingCharacter; 288 bool m_hasPendingCharacter;
289 UChar m_pendingCharacter; 289 UChar m_pendingCharacter;
290 }; 290 };
291 291
292 } // namespace WTF 292 } // namespace WTF
293 293
294 using WTF::StringHasher; 294 using WTF::StringHasher;
295 295
296 #endif // WTF_StringHasher_h 296 #endif // WTF_StringHasher_h
OLDNEW
« no previous file with comments | « Source/wtf/DateMath.cpp ('k') | Source/wtf/ThreadRestrictionVerifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698