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:
Guillermo Rodriguez Garcia 2000-02-20 01:08:40 +00:00
parent 52e52bea12
commit 967a322fe9

View File

@ -80,6 +80,10 @@ wxString wxTextFile::Translate(const wxString& text, wxTextFileType type)
if ( type == wxTextFileType_None )
return text;
// GRG: don't do anything either if it is empty
if ( text.IsEmpty() )
return text;
wxString eol = GetEOL(type), result;
// optimization: we know that the length of the new string will be about