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

Unified Diff: base/strings/utf_offset_string_conversions.cc

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/strings/utf_offset_string_conversions.cc
diff --git a/base/strings/utf_offset_string_conversions.cc b/base/strings/utf_offset_string_conversions.cc
index c2270bfce2ff3f468e5280f3a0bad9b8a88f9d99..322c7a28d3a2475cb9cd3be1300e2969d4acee70 100644
--- a/base/strings/utf_offset_string_conversions.cc
+++ b/base/strings/utf_offset_string_conversions.cc
@@ -4,6 +4,8 @@
#include "base/strings/utf_offset_string_conversions.h"
+#include <stdint.h>
+
#include <algorithm>
#include "base/logging.h"
@@ -188,9 +190,9 @@ bool ConvertUnicode(const SrcChar* src,
adjustments->clear();
// ICU requires 32-bit numbers.
bool success = true;
- int32 src_len32 = static_cast<int32>(src_len);
- for (int32 i = 0; i < src_len32; i++) {
- uint32 code_point;
+ int32_t src_len32 = static_cast<int32_t>(src_len);
+ for (int32_t i = 0; i < src_len32; i++) {
+ uint32_t code_point;
size_t original_i = i;
size_t chars_written = 0;
if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) {
« no previous file with comments | « base/strings/utf_offset_string_conversions.h ('k') | base/strings/utf_offset_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698