diff --git a/include/wx/catch_cppunit.h b/include/wx/catch_cppunit.h index f688077bd5..dc8e64024a 100644 --- a/include/wx/catch_cppunit.h +++ b/include/wx/catch_cppunit.h @@ -90,14 +90,12 @@ namespace Catch { std::string s; s.reserve(wxs.length()); - for ( wxString::const_iterator i = wxs.begin(); - i != wxs.end(); - ++i ) + for ( auto c : wxs ) { - if ( !iswprint(*i) ) - s += wxString::Format(wxASCII_STR("\\u%04X"), *i).ToAscii(); + if ( !iswprint(c) ) + s += wxString::Format(wxASCII_STR("\\u%04X"), c).ToAscii(); else - s += *i; + s += c; } return s;