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) {
191191 r += *it;
192192 break ;
193193 }
194- }else if ((ch & 0xe0 ) == 0xc0 ) {
194+ } else if ((ch & 0xe0 ) == 0xc0 ) {
195195 // 2 byte
196196 result = ch & 0x1f ;
197197 shift_state.expected = 2 ;
@@ -257,9 +257,9 @@ inline std::string escape_string(const std::string &s, unsigned options) {
257257 }
258258 } else {
259259
260- for (auto it = s. begin (); it != s. end (); ++it ) {
260+ for (char ch : s ) {
261261
262- switch (*it ) {
262+ switch (ch ) {
263263 case ' \" ' : r += " \\\" " ; break ;
264264 case ' \\ ' : r += " \\\\ " ; break ;
265265 #if 0
@@ -271,7 +271,7 @@ inline std::string escape_string(const std::string &s, unsigned options) {
271271 case ' \r ' : r += " \\ r" ; break ;
272272 case ' \t ' : r += " \\ t" ; break ;
273273 default :
274- r += *it ;
274+ r += ch ;
275275 break ;
276276 }
277277 }
You can’t perform that action at this time.
0 commit comments