diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index 8e1a589ee9..edad929cfe 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -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; diff --git a/src/gtk/dirdlg.cpp b/src/gtk/dirdlg.cpp index 5aeb52924e..b7246b262e 100644 --- a/src/gtk/dirdlg.cpp +++ b/src/gtk/dirdlg.cpp @@ -196,7 +196,6 @@ wxString wxDirDialog::GetPath() const void wxDirDialog::GetPaths(wxArrayString& paths) const { - paths.Empty(); paths = m_paths; } diff --git a/src/osx/cocoa/dirdlg.mm b/src/osx/cocoa/dirdlg.mm index d526b57774..8e446a8d10 100644 --- a/src/osx/cocoa/dirdlg.mm +++ b/src/osx/cocoa/dirdlg.mm @@ -179,7 +179,6 @@ wxString wxDirDialog::GetPath() const void wxDirDialog::GetPaths(wxArrayString& paths) const { - paths.Empty(); paths = m_paths; }