Index: base/string_number_conversions.cc |
diff --git a/base/string_number_conversions.cc b/base/string_number_conversions.cc |
index b8947dada57e29c1e73b31d8891c2198a7d0e68c..f5262d0a8cce517d77f49c28c42766585c94043c 100644 |
--- a/base/string_number_conversions.cc |
+++ b/base/string_number_conversions.cc |
@@ -403,11 +403,15 @@ bool StringToInt(std::string::const_iterator begin, |
output); |
} |
+#if !defined(OS_ANDROID) |
darin (slow to review)
2011/06/24 16:46:05
i think it would be better to declare a #define li
michaelbai
2011/06/24 18:51:30
Thanks, Done.
|
+// In Android platform, the compiler thinks std::string::const_iterator and |
+// "const char*" are equivalent types. |
bool StringToInt(const char* begin, const char* end, int* output) { |
return IteratorRangeToNumber<CharBufferToIntTraits>::Invoke(begin, |
end, |
output); |
} |
+#endif |
bool StringToInt(const string16& input, int* output) { |
return IteratorRangeToNumber<WideIteratorRangeToIntTraits>::Invoke( |
@@ -422,11 +426,15 @@ bool StringToInt(string16::const_iterator begin, |
output); |
} |
+#if !defined(OS_ANDROID) |
+// In Android platform, the compiler thinks base::string16::const_iterator and |
+// "char16*" are equivalent types. |
bool StringToInt(const char16* begin, const char16* end, int* output) { |
return IteratorRangeToNumber<WideCharBufferToIntTraits>::Invoke(begin, |
end, |
output); |
} |
+#endif |
bool StringToInt64(const std::string& input, int64* output) { |
return IteratorRangeToNumber<IteratorRangeToInt64Traits>::Invoke( |
@@ -441,11 +449,15 @@ bool StringToInt64(std::string::const_iterator begin, |
output); |
} |
+#if !defined(OS_ANDROID) |
+// In Android platform, the compiler thinks std::string::const_iterator and |
+// "char*" are equivalent types. |
bool StringToInt64(const char* begin, const char* end, int64* output) { |
return IteratorRangeToNumber<CharBufferToInt64Traits>::Invoke(begin, |
end, |
output); |
} |
+#endif |
bool StringToInt64(const string16& input, int64* output) { |
return IteratorRangeToNumber<WideIteratorRangeToInt64Traits>::Invoke( |
@@ -460,11 +472,15 @@ bool StringToInt64(string16::const_iterator begin, |
output); |
} |
+#if !defined(OS_ANDROID) |
+// In Android platform, the compiler thinks base::string16::const_iterator and |
+// "char16*" are equivalent types. |
bool StringToInt64(const char16* begin, const char16* end, int64* output) { |
return IteratorRangeToNumber<WideCharBufferToInt64Traits>::Invoke(begin, |
end, |
output); |
} |
+#endif |
bool StringToDouble(const std::string& input, double* output) { |
errno = 0; // Thread-safe? It is on at least Mac, Linux, and Windows. |
@@ -521,11 +537,15 @@ bool HexStringToInt(std::string::const_iterator begin, |
output); |
} |
+#if !defined(OS_ANDROID) |
+// In Android platform, the compiler thinks std::string::const_iterator and |
+// "char*" are equivalent types. |
bool HexStringToInt(const char* begin, const char* end, int* output) { |
return IteratorRangeToNumber<HexCharBufferToIntTraits>::Invoke(begin, |
end, |
output); |
} |
+#endif |
bool HexStringToBytes(const std::string& input, std::vector<uint8>* output) { |
return HexStringToBytesT(input, output); |