Use wxString::clear() instead of assignment to wxEmptyString
This commit is contained in:
parent
4821bb4072
commit
96826d80d2
@ -124,7 +124,7 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location)
|
||||
wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext);
|
||||
if ( !ft || !ft -> GetMimeType(&mime) )
|
||||
{
|
||||
mime = wxEmptyString;
|
||||
mime.clear();
|
||||
}
|
||||
|
||||
delete ft;
|
||||
@ -427,7 +427,7 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir)
|
||||
}
|
||||
}
|
||||
if (i == (int) m_Path.length())
|
||||
m_Path = wxEmptyString;
|
||||
m_Path.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -480,7 +480,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags)
|
||||
}
|
||||
if (meta != 0) break;
|
||||
}
|
||||
m_LastName = wxEmptyString;
|
||||
m_LastName.clear();
|
||||
|
||||
// try relative paths first :
|
||||
if (meta != wxT(':'))
|
||||
|
@ -535,7 +535,7 @@ bool wxLocale::Init(int language, int flags)
|
||||
ret = false;
|
||||
#elif defined(__WXMAC__)
|
||||
if (lang == wxLANGUAGE_DEFAULT)
|
||||
locale = wxEmptyString;
|
||||
locale.clear();
|
||||
else
|
||||
locale = info->CanonicalName;
|
||||
|
||||
|
@ -596,7 +596,7 @@ wxString wxTarEntry::GetInternalName(const wxString& name,
|
||||
while (!internal.empty() && internal.compare(0, 2, wxT("./")) == 0)
|
||||
internal.erase(0, 2);
|
||||
if (internal == wxT(".") || internal == wxT(".."))
|
||||
internal = wxEmptyString;
|
||||
internal.clear();
|
||||
|
||||
return internal;
|
||||
}
|
||||
|
@ -67,13 +67,13 @@ bool wxURI::Create(const wxString& uri)
|
||||
|
||||
void wxURI::Clear()
|
||||
{
|
||||
m_scheme =
|
||||
m_userinfo =
|
||||
m_server =
|
||||
m_port =
|
||||
m_path =
|
||||
m_query =
|
||||
m_fragment = wxEmptyString;
|
||||
m_scheme.clear();
|
||||
m_userinfo.clear();
|
||||
m_server.clear();
|
||||
m_port.clear();
|
||||
m_path.clear();
|
||||
m_query.clear();
|
||||
m_fragment.clear();
|
||||
|
||||
m_hostType = wxURI_REGNAME;
|
||||
|
||||
|
@ -72,7 +72,7 @@ void wxVariant::MakeNull()
|
||||
|
||||
void wxVariant::Clear()
|
||||
{
|
||||
m_name = wxEmptyString;
|
||||
m_name.clear();
|
||||
}
|
||||
|
||||
wxVariant::wxVariant(const wxVariant& variant)
|
||||
@ -2071,7 +2071,7 @@ bool wxVariantDataList::Write(wxSTD ostream& str) const
|
||||
|
||||
bool wxVariantDataList::Write(wxString& str) const
|
||||
{
|
||||
str = wxEmptyString;
|
||||
str.clear();
|
||||
wxVariantList::compatibility_iterator node = m_value.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ int wxObjectXmlReader::ReadComponent(wxXmlNode *node, wxObjectReaderCallback *ca
|
||||
{
|
||||
if ( propertyNames[j] == paramName )
|
||||
{
|
||||
propertyNames[j] = wxEmptyString;
|
||||
propertyNames[j].clear();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -901,7 +901,7 @@ wxString wxZipEntry::GetInternalName(const wxString& name,
|
||||
(internal[0] == wxS('.') && IsDOSPathSep(internal[1])))
|
||||
internal.erase(0, 2);
|
||||
if (internal == wxT(".") || internal == wxT(".."))
|
||||
internal = wxEmptyString;
|
||||
internal.clear();
|
||||
|
||||
return internal;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ wxHtmlStyleParams::wxHtmlStyleParams(const wxHtmlTag& tag)
|
||||
else
|
||||
{
|
||||
// Syntax problem change to blank string
|
||||
wd = "";
|
||||
wd.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ private:
|
||||
static int wxFSEventsToWatcherFlags(FSEventStreamEventFlags flags,
|
||||
wxFSWWarningType& warning, wxString& msg)
|
||||
{
|
||||
msg = "";
|
||||
msg.clear();
|
||||
warning = wxFSW_WARNING_NONE;
|
||||
|
||||
// see https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/index.html
|
||||
|
Loading…
Reference in New Issue
Block a user