Commit 83f0be36 authored by floitschV8@gmail.com's avatar floitschV8@gmail.com

Use Vector::SubVector instead of using the constructor.

Review URL: http://codereview.chromium.org/4148003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9640b6d9
......@@ -125,20 +125,20 @@ static double old_strtod(Vector<const char> buffer, int exponent) {
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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment