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

Side by Side Diff: Source/wtf/text/StringBuilder.h

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/text/AtomicStringCF.cpp ('k') | Source/wtf/text/StringConcatenate.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) 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 ASSERT(m_buffer); 257 ASSERT(m_buffer);
258 return m_buffer->characters16(); 258 return m_buffer->characters16();
259 } 259 }
260 260
261 bool is8Bit() const { return m_is8Bit; } 261 bool is8Bit() const { return m_is8Bit; }
262 262
263 void clear() 263 void clear()
264 { 264 {
265 m_length = 0; 265 m_length = 0;
266 m_string = String(); 266 m_string = String();
267 m_buffer = 0; 267 m_buffer = nullptr;
268 m_bufferCharacters8 = 0; 268 m_bufferCharacters8 = 0;
269 m_is8Bit = true; 269 m_is8Bit = true;
270 } 270 }
271 271
272 void swap(StringBuilder& stringBuilder) 272 void swap(StringBuilder& stringBuilder)
273 { 273 {
274 std::swap(m_length, stringBuilder.m_length); 274 std::swap(m_length, stringBuilder.m_length);
275 m_string.swap(stringBuilder.m_string); 275 m_string.swap(stringBuilder.m_string);
276 m_buffer.swap(stringBuilder.m_buffer); 276 m_buffer.swap(stringBuilder.m_buffer);
277 std::swap(m_is8Bit, stringBuilder.m_is8Bit); 277 std::swap(m_is8Bit, stringBuilder.m_is8Bit);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a , b); } 391 inline bool operator==(const StringBuilder& a, const String& b) { return equal(a , b); }
392 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal( a, b); } 392 inline bool operator!=(const StringBuilder& a, const String& b) { return !equal( a, b); }
393 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b , a); } 393 inline bool operator==(const String& a, const StringBuilder& b) { return equal(b , a); }
394 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal( b, a); } 394 inline bool operator!=(const String& a, const StringBuilder& b) { return !equal( b, a); }
395 395
396 } // namespace WTF 396 } // namespace WTF
397 397
398 using WTF::StringBuilder; 398 using WTF::StringBuilder;
399 399
400 #endif // StringBuilder_h 400 #endif // StringBuilder_h
OLDNEW
« no previous file with comments | « Source/wtf/text/AtomicStringCF.cpp ('k') | Source/wtf/text/StringConcatenate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698