Remove returns of wxEmptyString

This commit is contained in:
Paul Cornett
2017-02-18 11:26:40 -08:00
parent 32535f5bf6
commit 6169ced23f
8 changed files with 47 additions and 37 deletions

View File

@@ -2247,18 +2247,20 @@ enum TimeSpanPart
// %l milliseconds (000 - 999)
wxString wxTimeSpan::Format(const wxString& format) const
{
wxString str;
// we deal with only positive time spans here and just add the sign in
// front for the negative ones
if ( IsNegative() )
{
wxString str(Negate().Format(format));
return "-" + str;
str = "-";
str << Negate().Format(format);
return str;
}
wxCHECK_MSG( !format.empty(), wxEmptyString,
wxCHECK_MSG( !format.empty(), str,
wxT("NULL format in wxTimeSpan::Format") );
wxString str;
str.Alloc(format.length());
// Suppose we have wxTimeSpan ts(1 /* hour */, 2 /* min */, 3 /* sec */)