File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ inline std::string escape_string(const std::string &s, unsigned options) {
191
191
r += *it;
192
192
break ;
193
193
}
194
- }else if ((ch & 0xe0 ) == 0xc0 ) {
194
+ } else if ((ch & 0xe0 ) == 0xc0 ) {
195
195
// 2 byte
196
196
result = ch & 0x1f ;
197
197
shift_state.expected = 2 ;
@@ -257,9 +257,9 @@ inline std::string escape_string(const std::string &s, unsigned options) {
257
257
}
258
258
} else {
259
259
260
- for (auto it = s. begin (); it != s. end (); ++it ) {
260
+ for (char ch : s ) {
261
261
262
- switch (*it ) {
262
+ switch (ch ) {
263
263
case ' \" ' : r += " \\\" " ; break ;
264
264
case ' \\ ' : r += " \\\\ " ; break ;
265
265
#if 0
@@ -271,7 +271,7 @@ inline std::string escape_string(const std::string &s, unsigned options) {
271
271
case ' \r ' : r += " \\ r" ; break ;
272
272
case ' \t ' : r += " \\ t" ; break ;
273
273
default :
274
- r += *it ;
274
+ r += ch ;
275
275
break ;
276
276
}
277
277
}
You can’t perform that action at this time.
0 commit comments