diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-22 13:49:44 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-22 13:49:44 -0800 |
commit | cd2bb30aba89a05c0bbd4d6973fa070205e3a1e8 (patch) | |
tree | 0eca7841e7be4b9392bbcd0ffb656a8495f64792 /fpdfsdk/src/javascript/util.cpp | |
parent | bc75f1737f7eb8d45c5a2ebd3ad78203782c1642 (diff) | |
download | pdfium-cd2bb30aba89a05c0bbd4d6973fa070205e3a1e8.tar.xz |
Merge to XFA: Add ContainsKey() and ContainsValue() and use them where appropriate.
TBR=ochang@chromium.org
Review URL: https://codereview.chromium.org/1540263003 .
(cherry picked from commit 1fc92867ca53f0fba4272fbee3814d844f487495)
Review URL: https://codereview.chromium.org/1542193002 .
Diffstat (limited to 'fpdfsdk/src/javascript/util.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/util.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp index cb9c9b2231..a14e81c203 100644 --- a/fpdfsdk/src/javascript/util.cpp +++ b/fpdfsdk/src/javascript/util.cpp @@ -468,17 +468,13 @@ void util::printx(const std::string& cFormat, case '\\': break; case '>': { - for (std::string::iterator it = cSource.begin(); it != cSource.end(); - it++) { - *it = toupper(*it); - } + for (char& c : cSource) + c = toupper(c); break; } case '<': { - for (std::string::iterator it = cSource.begin(); it != cSource.end(); - it++) { - *it = tolower(*it); - } + for (char& c : cSource) + c = tolower(c); break; } case '=': |