Index: src/conversions.cc |
diff --git a/src/conversions.cc b/src/conversions.cc |
index fd0f9ee4d81cce588c5f2625463205d0a117d206..5f1219eea9139cf2aa77c0c8dda95609b6a12481 100644 |
--- a/src/conversions.cc |
+++ b/src/conversions.cc |
@@ -46,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); |
} |
@@ -56,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, |