mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-28 15:50:17 +08:00
Use range-for loop over wxString in Catch::StringMaker<wxString>
No changes, just simplify the code by using range-for.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user