| Index: src/conversions.cc
|
| diff --git a/src/conversions.cc b/src/conversions.cc
|
| index cdc42e34d9ed9a77d73dfe9245621348d83c84c4..5f1219eea9139cf2aa77c0c8dda95609b6a12481 100644
|
| --- a/src/conversions.cc
|
| +++ b/src/conversions.cc
|
| @@ -31,6 +31,7 @@
|
|
|
| #include "conversions-inl.h"
|
| #include "dtoa.h"
|
| +#include "list-inl.h"
|
| #include "strtod.h"
|
| #include "utils.h"
|
|
|
| @@ -45,8 +46,11 @@ namespace internal {
|
|
|
| double StringToDouble(UnicodeCache* unicode_cache,
|
| const char* str, int flags, double empty_string_val) {
|
| - const char* end = str + StrLength(str);
|
| - return InternalStringToDouble(unicode_cache, str, end, flags,
|
| + // We cast to const uint8_t* here to avoid instantiating the
|
| + // InternalStringToDouble() template for const char* as well.
|
| + const uint8_t* start = reinterpret_cast<const uint8_t*>(str);
|
| + const uint8_t* end = start + StrLength(str);
|
| + return InternalStringToDouble(unicode_cache, start, end, flags,
|
| empty_string_val);
|
| }
|
|
|
| @@ -55,11 +59,15 @@ double StringToDouble(UnicodeCache* unicode_cache,
|
| Vector<const char> str,
|
| int flags,
|
| double empty_string_val) {
|
| - const char* end = str.start() + str.length();
|
| - return InternalStringToDouble(unicode_cache, str.start(), end, flags,
|
| + // We cast to const uint8_t* here to avoid instantiating the
|
| + // InternalStringToDouble() template for const char* as well.
|
| + const uint8_t* start = reinterpret_cast<const uint8_t*>(str.start());
|
| + const uint8_t* end = start + str.length();
|
| + return InternalStringToDouble(unicode_cache, start, end, flags,
|
| empty_string_val);
|
| }
|
|
|
| +
|
| double StringToDouble(UnicodeCache* unicode_cache,
|
| Vector<const uc16> str,
|
| int flags,
|
|
|