OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 while (characters < end) | 314 while (characters < end) |
315 *(dest++) = *(characters++); | 315 *(dest++) = *(characters++); |
316 } | 316 } |
317 } | 317 } |
318 | 318 |
319 void StringBuilder::appendNumber(int number) | 319 void StringBuilder::appendNumber(int number) |
320 { | 320 { |
321 numberToStringSigned<StringBuilder>(number, this); | 321 numberToStringSigned<StringBuilder>(number, this); |
322 } | 322 } |
323 | 323 |
324 void StringBuilder::appendNumber(unsigned int number) | 324 void StringBuilder::appendNumber(unsigned number) |
325 { | 325 { |
326 numberToStringUnsigned<StringBuilder>(number, this); | 326 numberToStringUnsigned<StringBuilder>(number, this); |
327 } | 327 } |
328 | 328 |
329 void StringBuilder::appendNumber(long number) | 329 void StringBuilder::appendNumber(long number) |
330 { | 330 { |
331 numberToStringSigned<StringBuilder>(number, this); | 331 numberToStringSigned<StringBuilder>(number, this); |
332 } | 332 } |
333 | 333 |
334 void StringBuilder::appendNumber(unsigned long number) | 334 void StringBuilder::appendNumber(unsigned long number) |
(...skipping 22 matching lines...) Expand all Loading... |
357 if (!canShrink()) | 357 if (!canShrink()) |
358 return; | 358 return; |
359 if (m_is8Bit) | 359 if (m_is8Bit) |
360 reallocateBuffer<LChar>(m_length); | 360 reallocateBuffer<LChar>(m_length); |
361 else | 361 else |
362 reallocateBuffer<UChar>(m_length); | 362 reallocateBuffer<UChar>(m_length); |
363 m_string = m_buffer.release(); | 363 m_string = m_buffer.release(); |
364 } | 364 } |
365 | 365 |
366 } // namespace WTF | 366 } // namespace WTF |
OLD | NEW |