X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4d02bd56540d1f552b93a300f8df5307130c3b1..cbc9145c04bd3ea0a228906c8363fa8f47e3acf9:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 0a70d793a8..98a635bc49 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -86,44 +86,8 @@ extern const wxChar WXDLLIMPEXP_BASE *wxEmptyString = &g_strEmpty.dummy; #if wxUSE_STD_IOSTREAM -// MS Visual C++ version 5.0 provides the new STL headers as well as the old -// iostream ones. -// -// ATTN: you can _not_ use both of these in the same program! - #include -wxSTD istream& operator>>(wxSTD istream& is, wxString& WXUNUSED(str)) -{ -#if 0 - int w = is.width(0); - if ( is.ipfx(0) ) { - streambuf *sb = is.rdbuf(); - str.erase(); - while ( true ) { - int ch = sb->sbumpc (); - if ( ch == EOF ) { - is.setstate(ios::eofbit); - break; - } - else if ( isspace(ch) ) { - sb->sungetc(); - break; - } - - str += ch; - if ( --w == 1 ) - break; - } - } - - is.isfx(); - if ( str.length() == 0 ) - is.setstate(ios::failbit); -#endif - return is; -} - wxSTD ostream& operator<<(wxSTD ostream& os, const wxString& str) { #ifdef __BORLANDC__ @@ -1618,7 +1582,7 @@ wxString& wxString::Trim(bool bFromRight) { // find last non-space character reverse_iterator psz = rbegin(); - while ( wxSafeIsspace(*psz) && (psz != rend()) ) + while ( (psz != rend()) && wxSafeIsspace(*psz) ) psz++; // truncate at trailing space start @@ -1628,7 +1592,7 @@ wxString& wxString::Trim(bool bFromRight) { // find first non-space character iterator psz = begin(); - while ( wxSafeIsspace(*psz) && (psz != end()) ) + while ( (psz != end()) && wxSafeIsspace(*psz) ) psz++; // fix up data and length