Commit e9166457fad8d446572b8434d1895aa586baf6b7
1 parent
07bc3632
Tweak pull request contribution on fixing non-standard basic_string_view
Showing
1 changed file
with
2 additions
and
2 deletions
libqpdf/QPDF_Name.cc
| @@ -59,8 +59,8 @@ QPDF_Name::analyzeJSONEncoding(const std::string& name) | @@ -59,8 +59,8 @@ QPDF_Name::analyzeJSONEncoding(const std::string& name) | ||
| 59 | bool tail2 = false; // Potential overlong 3 octet utf-8. | 59 | bool tail2 = false; // Potential overlong 3 octet utf-8. |
| 60 | bool tail3 = false; // potential overlong 4 octet | 60 | bool tail3 = false; // potential overlong 4 octet |
| 61 | bool needs_escaping = false; | 61 | bool needs_escaping = false; |
| 62 | - for (auto it = name.begin(); it != name.end(); ++it) { | ||
| 63 | - unsigned char c = static_cast<unsigned char>(*it); | 62 | + for (auto const& it: name) { |
| 63 | + auto c = static_cast<unsigned char>(it); | ||
| 64 | if (tail) { | 64 | if (tail) { |
| 65 | if ((c & 0xc0) != 0x80) { | 65 | if ((c & 0xc0) != 0x80) { |
| 66 | return {false, false}; | 66 | return {false, false}; |