Avoid using wxString::Empty()

This is confusingly similar to std::string::empty() which doesn't do the
same thing, so prefer using clear() instead.

And simply remove Empty() calls before the assignment, as they're
useless.

No real changes.
This commit is contained in:
Vadim Zeitlin
2020-07-10 03:43:23 +02:00
parent d8f460200a
commit 2b0323ebc8
3 changed files with 5 additions and 3 deletions

View File

@@ -94,7 +94,11 @@ public:
return m_path;
}
virtual void GetPaths(wxArrayString& paths) const { paths.Empty(); paths.Add(m_path); }
virtual void GetPaths(wxArrayString& paths) const
{
paths.clear();
paths.push_back(m_path);
}
protected:
wxString m_message;

View File

@@ -196,7 +196,6 @@ wxString wxDirDialog::GetPath() const
void wxDirDialog::GetPaths(wxArrayString& paths) const
{
paths.Empty();
paths = m_paths;
}

View File

@@ -179,7 +179,6 @@ wxString wxDirDialog::GetPath() const
void wxDirDialog::GetPaths(wxArrayString& paths) const
{
paths.Empty();
paths = m_paths;
}