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

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: addressed the comments 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
« no previous file with comments | « base/hash_tables.h ('k') | base/string_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_number_conversions.cc
diff --git a/base/string_number_conversions.cc b/base/string_number_conversions.cc
index b8947dada57e29c1e73b31d8891c2198a7d0e68c..efa7d5f5bf54245f2e87e57fa79204ae7ba71ea7 100644
--- a/base/string_number_conversions.cc
+++ b/base/string_number_conversions.cc
@@ -403,11 +403,13 @@ bool StringToInt(std::string::const_iterator begin,
output);
}
+#if !defined(STD_STRING_ITERATOR_IS_CHAR_POINTER)
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 +424,13 @@ bool StringToInt(string16::const_iterator begin,
output);
}
+#if !defined(BASE_STRING16_ITERATOR_IS_CHAR16_POINTER)
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 +445,13 @@ bool StringToInt64(std::string::const_iterator begin,
output);
}
+#if !defined(STD_STRING_ITERATOR_IS_CHAR_POINTER)
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 +466,13 @@ bool StringToInt64(string16::const_iterator begin,
output);
}
+#if !defined(BASE_STRING16_ITERATOR_IS_CHAR16_POINTER)
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 +529,13 @@ bool HexStringToInt(std::string::const_iterator begin,
output);
}
+#if !defined(STD_STRING_ITERATOR_IS_CHAR_POINTER)
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);
« no previous file with comments | « base/hash_tables.h ('k') | base/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698