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

Unified Diff: src/conversions.cc

Issue 1732019: Switch to vectors instead of bare char* arrays. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 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/fast-dtoa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions.cc
===================================================================
--- src/conversions.cc (revision 4542)
+++ src/conversions.cc (working copy)
@@ -769,9 +769,11 @@
char* decimal_rep;
bool used_gay_dtoa = false;
- char fast_dtoa_buffer[kFastDtoaMaximalLength + 1];
+ const int kFastDtoaBufferCapacity = kFastDtoaMaximalLength + 1;
+ char fast_dtoa_buffer[kFastDtoaBufferCapacity];
int length;
- if (FastDtoa(v, fast_dtoa_buffer, &sign, &length, &decimal_point)) {
+ if (FastDtoa(v, Vector<char>(fast_dtoa_buffer, kFastDtoaBufferCapacity),
+ &sign, &length, &decimal_point)) {
decimal_rep = fast_dtoa_buffer;
} else {
decimal_rep = dtoa(v, 0, 0, &decimal_point, &sign, NULL);
« no previous file with comments | « no previous file | src/fast-dtoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698