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

Unified Diff: testing/fx_string_testhelpers.cpp

Issue 1840483003: Reduce signed/unsigned comparison warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
« fpdfsdk/pdfwindow/PWL_FontMap.cpp ('K') | « fpdfsdk/pdfwindow/PWL_FontMap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/fx_string_testhelpers.cpp
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp
index e6b4a38397ccafb89d31bf4e1db58feee25e09d8..b2d30f3a060189e0273184b30746e36498cd2e40 100644
--- a/testing/fx_string_testhelpers.cpp
+++ b/testing/fx_string_testhelpers.cpp
@@ -12,7 +12,8 @@ namespace {
template <typename T>
std::ostream& output_string(std::ostream& out, const T& str) {
out << std::hex << std::setfill('0') << '"';
- for (size_t i = 0; i < str.GetLength(); ++i) {
+ // This function is used for FX strings whose length is defined as int.
+ for (int i = 0; i < str.GetLength(); ++i) {
unsigned int c = str.GetAt(i);
if (c >= 0x20 && c < 0x7F) {
out << static_cast<char>(c);
« fpdfsdk/pdfwindow/PWL_FontMap.cpp ('K') | « fpdfsdk/pdfwindow/PWL_FontMap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698