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: third_party/WebKit/Source/wtf/text/StringBuilder.h

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void append(UChar32 c) 134 void append(UChar32 c)
135 { 135 {
136 if (U_IS_BMP(c)) { 136 if (U_IS_BMP(c)) {
137 append(static_cast<UChar>(c)); 137 append(static_cast<UChar>(c));
138 return; 138 return;
139 } 139 }
140 append(U16_LEAD(c)); 140 append(U16_LEAD(c));
141 append(U16_TRAIL(c)); 141 append(U16_TRAIL(c));
142 } 142 }
143 143
144 template<unsigned charactersCount>
145 ALWAYS_INLINE void appendLiteral(const char (&characters)[charactersCount]) { append(characters, charactersCount - 1); }
146
147 void appendNumber(int); 144 void appendNumber(int);
148 void appendNumber(unsigned); 145 void appendNumber(unsigned);
149 void appendNumber(long); 146 void appendNumber(long);
150 void appendNumber(unsigned long); 147 void appendNumber(unsigned long);
151 void appendNumber(long long); 148 void appendNumber(long long);
152 void appendNumber(unsigned long long); 149 void appendNumber(unsigned long long);
153 void appendNumber(double, unsigned precision = 6, TrailingZerosTruncatingPol icy = TruncateTrailingZeros); 150 void appendNumber(double, unsigned precision = 6, TrailingZerosTruncatingPol icy = TruncateTrailingZeros);
154 151
155 String toString() 152 String toString()
156 { 153 {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a , b); } 368 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a , b); }
372 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal( a, b); } 369 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal( a, b); }
373 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b , a); } 370 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b , a); }
374 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal( b, a); } 371 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal( b, a); }
375 372
376 } // namespace WTF 373 } // namespace WTF
377 374
378 using WTF::StringBuilder; 375 using WTF::StringBuilder;
379 376
380 #endif // StringBuilder_h 377 #endif // StringBuilder_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/InstanceCounter.cpp ('k') | third_party/WebKit/Source/wtf/text/StringBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698