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