Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: base/string_number_conversions.cc

Issue 7238018: Upstream android string implementation etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update the comments in string_number_conversions.cc Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« base/hash_tables.h ('K') | « base/hash_tables.h ('k') | base/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698