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

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

Issue 1444173002: third_party/WebKit: fix typos found in comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL Description change, Typo patch apply to upstream master. Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingWin.cpp ('k') | no next file » | 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 * 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. All rights reserved. 6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights reserved.
7 * 7 *
8 * Permission to use, copy, modify, and distribute this software for any 8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose without fee is hereby granted, provided that this entire notice 9 * purpose without fee is hereby granted, provided that this entire notice
10 * is included in all copies of any software which is or includes a copy 10 * is included in all copies of any software which is or includes a copy
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 // FIXME: Zeros should be stripped before the 'e'. 1240 // FIXME: Zeros should be stripped before the 'e'.
1241 if (memchr(buffer, 'e', length)) 1241 if (memchr(buffer, 'e', length))
1242 return builder.Finalize(); 1242 return builder.Finalize();
1243 1243
1244 size_t decimalPointPosition = 0; 1244 size_t decimalPointPosition = 0;
1245 for (; decimalPointPosition < length; ++decimalPointPosition) { 1245 for (; decimalPointPosition < length; ++decimalPointPosition) {
1246 if (buffer[decimalPointPosition] == '.') 1246 if (buffer[decimalPointPosition] == '.')
1247 break; 1247 break;
1248 } 1248 }
1249 1249
1250 // No decimal seperator found, early exit. 1250 // No decimal separator found, early exit.
1251 if (decimalPointPosition == length) 1251 if (decimalPointPosition == length)
1252 return builder.Finalize(); 1252 return builder.Finalize();
1253 1253
1254 size_t truncatedLength = length - 1; 1254 size_t truncatedLength = length - 1;
1255 for (; truncatedLength > decimalPointPosition; --truncatedLength) { 1255 for (; truncatedLength > decimalPointPosition; --truncatedLength) {
1256 if (buffer[truncatedLength] != '0') 1256 if (buffer[truncatedLength] != '0')
1257 break; 1257 break;
1258 } 1258 }
1259 1259
1260 // No trailing zeros found to strip. 1260 // No trailing zeros found to strip.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 { 1311 {
1312 Vector<LChar> conversionBuffer(length); 1312 Vector<LChar> conversionBuffer(length);
1313 for (size_t i = 0; i < length; ++i) 1313 for (size_t i = 0; i < length; ++i)
1314 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0; 1314 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0;
1315 return parseDouble(conversionBuffer.data(), length, parsedLength); 1315 return parseDouble(conversionBuffer.data(), length, parsedLength);
1316 } 1316 }
1317 1317
1318 } // namespace Internal 1318 } // namespace Internal
1319 1319
1320 } // namespace WTF 1320 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingWin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698