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

Unified Diff: src/strtod.cc

Issue 4148003: Use Vector::SubVector instead of using the constructor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/strtod.cc
diff --git a/src/strtod.cc b/src/strtod.cc
index bc4c1f2bece09d946b8844ae309effd79e045a33..e7721ab93590409662d8cf0f8c61db8b00300454 100644
--- a/src/strtod.cc
+++ b/src/strtod.cc
@@ -94,20 +94,20 @@ static const int kMaxSignificantDecimalDigits = 780;
static Vector<const char> TrimLeadingZeros(Vector<const char> buffer) {
for (int i = 0; i < buffer.length(); i++) {
if (buffer[i] != '0') {
- return Vector<const char>(buffer.start() + i, buffer.length() - i);
+ return buffer.SubVector(i, buffer.length());
}
}
- return Vector<const char>(buffer.start(), 0);
+ return buffer.SubVector(0, 0);
}
static Vector<const char> TrimTrailingZeros(Vector<const char> buffer) {
for (int i = buffer.length() - 1; i >= 0; --i) {
if (buffer[i] != '0') {
- return Vector<const char>(buffer.start(), i + 1);
+ return buffer.SubVector(0, i + 1);
}
}
- return Vector<const char>(buffer.start(), 0);
+ return buffer.SubVector(0, 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698