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

Unified Diff: base/strings/string_number_conversions.cc

Issue 1212653005: [ADANDONED] Helper code for finding problematic uses of IntToString variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int_to_string_cleanup_net
Patch Set: Disable warnings on IntToString's own tests. Created 5 years, 3 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/strings/string_number_conversions.h ('k') | base/strings/string_number_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_number_conversions.cc
diff --git a/base/strings/string_number_conversions.cc b/base/strings/string_number_conversions.cc
index b6b65d2a3bf8ce53dc1fd463006ce1bc88877377..b2ab24028f314ea50fd803738ec39ceef4aadc7f 100644
--- a/base/strings/string_number_conversions.cc
+++ b/base/strings/string_number_conversions.cc
@@ -372,6 +372,10 @@ bool String16ToIntImpl(const StringPiece16& input, VALUE* output) {
} // namespace
+#if defined(STRING_NUMBER_CONVERSIONS_DETECT_RISKY_CONVERSIONS)
+namespace internal {
+#endif
+
std::string IntToString(int value) {
return IntToStringT<std::string, int, unsigned int, true>::
IntToString(value);
@@ -423,6 +427,10 @@ std::string DoubleToString(double value) {
return std::string(buffer);
}
+#if defined(STRING_NUMBER_CONVERSIONS_DETECT_RISKY_CONVERSIONS)
+} // namespace internal
+#endif
+
bool StringToInt(const StringPiece& input, int* output) {
return StringToIntImpl(input, output);
}
« no previous file with comments | « base/strings/string_number_conversions.h ('k') | base/strings/string_number_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698