Index: base/i18n/rtl.cc |
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc |
index 851b03642defb3ce43742b1a74405e8f05362cd5..84dc51fd5d6f05e0e38575c362da8eef3556c255 100644 |
--- a/base/i18n/rtl.cc |
+++ b/base/i18n/rtl.cc |
@@ -263,15 +263,18 @@ bool AdjustStringForLocaleDirection(string16* text) { |
bool has_rtl_chars = StringContainsStrongRTLChars(*text); |
if (!ui_direction_is_rtl && has_rtl_chars) { |
WrapStringWithRTLFormatting(text); |
- text->insert(0U, 1U, kLeftToRightMark); |
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1), |
+ kLeftToRightMark); |
text->push_back(kLeftToRightMark); |
} else if (ui_direction_is_rtl && has_rtl_chars) { |
WrapStringWithRTLFormatting(text); |
- text->insert(0U, 1U, kRightToLeftMark); |
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1), |
+ kRightToLeftMark); |
text->push_back(kRightToLeftMark); |
} else if (ui_direction_is_rtl) { |
WrapStringWithLTRFormatting(text); |
- text->insert(0U, 1U, kRightToLeftMark); |
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1), |
+ kRightToLeftMark); |
text->push_back(kRightToLeftMark); |
} else { |
return false; |
@@ -332,7 +335,8 @@ void WrapStringWithLTRFormatting(string16* text) { |
return; |
// Inserting an LRE (Left-To-Right Embedding) mark as the first character. |
- text->insert(0U, 1U, kLeftToRightEmbeddingMark); |
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1), |
+ kLeftToRightEmbeddingMark); |
// Inserting a PDF (Pop Directional Formatting) mark as the last character. |
text->push_back(kPopDirectionalFormatting); |
@@ -343,7 +347,8 @@ void WrapStringWithRTLFormatting(string16* text) { |
return; |
// Inserting an RLE (Right-To-Left Embedding) mark as the first character. |
- text->insert(0U, 1U, kRightToLeftEmbeddingMark); |
+ text->insert(static_cast<size_t>(0), static_cast<size_t>(1), |
+ kRightToLeftEmbeddingMark); |
// Inserting a PDF (Pop Directional Formatting) mark as the last character. |
text->push_back(kPopDirectionalFormatting); |