Don't try to translate empty strings (just a cosmetical issue - it should
not fail anyway, but it is cleaner this way) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -80,6 +80,10 @@ wxString wxTextFile::Translate(const wxString& text, wxTextFileType type)
|
|||||||
if ( type == wxTextFileType_None )
|
if ( type == wxTextFileType_None )
|
||||||
return text;
|
return text;
|
||||||
|
|
||||||
|
// GRG: don't do anything either if it is empty
|
||||||
|
if ( text.IsEmpty() )
|
||||||
|
return text;
|
||||||
|
|
||||||
wxString eol = GetEOL(type), result;
|
wxString eol = GetEOL(type), result;
|
||||||
|
|
||||||
// optimization: we know that the length of the new string will be about
|
// optimization: we know that the length of the new string will be about
|
||||||
|
Reference in New Issue
Block a user