From 83f0be364e79bd13af3b5757fa8b9772a930d2fd Mon Sep 17 00:00:00 2001 From: "floitschV8@gmail.com" Date: Tue, 26 Oct 2010 13:30:31 +0000 Subject: [PATCH] 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 --- src/strtod.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strtod.cc b/src/strtod.cc index a309e7b..76e2bc4 100644 --- a/src/strtod.cc +++ b/src/strtod.cc @@ -125,20 +125,20 @@ static double old_strtod(Vector buffer, int exponent) { static Vector TrimLeadingZeros(Vector buffer) { for (int i = 0; i < buffer.length(); i++) { if (buffer[i] != '0') { - return Vector(buffer.start() + i, buffer.length() - i); + return buffer.SubVector(i, buffer.length()); } } - return Vector(buffer.start(), 0); + return buffer.SubVector(0, 0); } static Vector TrimTrailingZeros(Vector buffer) { for (int i = buffer.length() - 1; i >= 0; --i) { if (buffer[i] != '0') { - return Vector(buffer.start(), i + 1); + return buffer.SubVector(0, i + 1); } } - return Vector(buffer.start(), 0); + return buffer.SubVector(0, 0); } -- 2.7.4