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

Side by Side Diff: third_party/WebKit/Source/wtf/text/IntegerToStringConversion.h

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2012 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Patrick Gansterer <paroga@paroga.com> 3 * Copyright (C) 2012 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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef IntegerToStringConversion_h 22 #ifndef IntegerToStringConversion_h
23 #define IntegerToStringConversion_h 23 #define IntegerToStringConversion_h
24 24
25 #include <limits>
26 #include <type_traits>
25 #include "base/numerics/safe_conversions.h" 27 #include "base/numerics/safe_conversions.h"
26 #include "wtf/StdLibExtras.h" 28 #include "wtf/StdLibExtras.h"
27 #include "wtf/text/Unicode.h" 29 #include "wtf/text/Unicode.h"
28 #include <limits>
29 #include <type_traits>
30 30
31 namespace WTF { 31 namespace WTF {
32 32
33 // TODO(esprehn): See if we can generalize IntToStringT in 33 // TODO(esprehn): See if we can generalize IntToStringT in
34 // base/strings/string_number_conversions.cc, and use unsigned type expansion 34 // base/strings/string_number_conversions.cc, and use unsigned type expansion
35 // optimization here instead of CheckedNumeric::UnsignedAbs(). 35 // optimization here instead of CheckedNumeric::UnsignedAbs().
36 template <typename IntegerType> 36 template <typename IntegerType>
37 class IntegerToStringConverter { 37 class IntegerToStringConverter {
38 public: 38 public:
39 static_assert(std::is_integral<IntegerType>::value, 39 static_assert(std::is_integral<IntegerType>::value,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 std::numeric_limits<IntegerType>::is_signed; 73 std::numeric_limits<IntegerType>::is_signed;
74 74
75 LChar m_buffer[kBufferSize]; 75 LChar m_buffer[kBufferSize];
76 LChar* m_begin; 76 LChar* m_begin;
77 unsigned m_length; 77 unsigned m_length;
78 }; 78 };
79 79
80 } // namespace WTF 80 } // namespace WTF
81 81
82 #endif // IntegerToStringConversion_h 82 #endif // IntegerToStringConversion_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/Collator.h ('k') | third_party/WebKit/Source/wtf/text/StringBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698