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

Unified Diff: src/conversions.cc

Issue 3519017: Weed out extreme exponents in strtod. (Closed)
Patch Set: Remove unnecessary include from test-strtod.cc. Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/strtod.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions.cc
diff --git a/src/conversions.cc b/src/conversions.cc
index a7a0867663926d7cb9c32366c39e58f94350ae2b..790e807aef4f898413774f6c0c6b6f7ca648e7ea 100644
--- a/src/conversions.cc
+++ b/src/conversions.cc
@@ -353,7 +353,7 @@ static double InternalStringToInt(Iterator current, EndMark end, int radix) {
ASSERT(buffer_pos < kBufferSize);
buffer[buffer_pos] = '\0';
- Vector<char> buffer_vector(buffer, buffer_pos);
+ Vector<const char> buffer_vector(buffer, buffer_pos);
return sign ? -Strtod(buffer_vector, 0) : Strtod(buffer_vector, 0);
}
@@ -653,7 +653,7 @@ static double InternalStringToDouble(Iterator current,
ASSERT(buffer_pos < kBufferSize);
buffer[buffer_pos] = '\0';
- double converted = Strtod(Vector<char>(buffer, buffer_pos), exponent);
+ double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
return sign? -converted: converted;
}
« no previous file with comments | « no previous file | src/strtod.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698