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

Side by Side Diff: third_party/WebKit/Source/platform/wtf/dtoa.cpp

Issue 2764243002: Move files in wtf/ to platform/wtf/ (Part 9). (Closed)
Patch Set: Rebase. Created 3 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
OLDNEW
1 /**************************************************************** 1 /****************************************************************
2 * 2 *
3 * The author of this software is David M. Gay. 3 * The author of this software is David M. Gay.
4 * 4 *
5 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. 5 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. 6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Permission to use, copy, modify, and distribute this software for any 9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose without fee is hereby granted, provided that this entire notice 10 * purpose without fee is hereby granted, provided that this entire notice
(...skipping 15 matching lines...) Expand all
26 * necessary to specify double-precision (53-bit) rounding precision 26 * necessary to specify double-precision (53-bit) rounding precision
27 * before invoking strtod or dtoa. If the machine uses (the equivalent 27 * before invoking strtod or dtoa. If the machine uses (the equivalent
28 * of) Intel 80x87 arithmetic, the call 28 * of) Intel 80x87 arithmetic, the call
29 * _control87(PC_53, MCW_PC); 29 * _control87(PC_53, MCW_PC);
30 * does this with many compilers. Whether this or another call is 30 * does this with many compilers. Whether this or another call is
31 * appropriate depends on the compiler; for this to work, it may be 31 * appropriate depends on the compiler; for this to work, it may be
32 * necessary to #include "float.h" or another system-dependent header 32 * necessary to #include "float.h" or another system-dependent header
33 * file. 33 * file.
34 */ 34 */
35 35
36 #include "wtf/dtoa.h" 36 #include "platform/wtf/dtoa.h"
37 37
38 #include "wtf/Vector.h" 38 #include "platform/wtf/Vector.h"
39 #include <string.h> 39 #include <string.h>
40 40
41 namespace WTF { 41 namespace WTF {
42 42
43 const char* numberToString(double d, NumberToStringBuffer buffer) { 43 const char* numberToString(double d, NumberToStringBuffer buffer) {
44 double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength); 44 double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
45 const double_conversion::DoubleToStringConverter& converter = 45 const double_conversion::DoubleToStringConverter& converter =
46 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); 46 double_conversion::DoubleToStringConverter::EcmaScriptConverter();
47 converter.ToShortest(d, &builder); 47 converter.ToShortest(d, &builder);
48 return builder.Finalize(); 48 return builder.Finalize();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 size_t& parsedLength) { 138 size_t& parsedLength) {
139 Vector<LChar> conversionBuffer(length); 139 Vector<LChar> conversionBuffer(length);
140 for (size_t i = 0; i < length; ++i) 140 for (size_t i = 0; i < length; ++i)
141 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0; 141 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0;
142 return parseDouble(conversionBuffer.data(), length, parsedLength); 142 return parseDouble(conversionBuffer.data(), length, parsedLength);
143 } 143 }
144 144
145 } // namespace Internal 145 } // namespace Internal
146 146
147 } // namespace WTF 147 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/dtoa.h ('k') | third_party/WebKit/Source/platform/wtf/dtoa/COPYING » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698