]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just use wxString::clear() instead of assignment.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 9 Mar 2013 15:08:40 +0000 (15:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 9 Mar 2013 15:08:40 +0000 (15:08 +0000)
Consistently use clear() everywhere instead of assigning wxEmptyString in some
places and wxT("") in some others to a string in order to clear it.

See #15091.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filename.h
src/common/filename.cpp

index 7ef9e2f93d6359d28bdc4bab26958cb0f1fd0eda..7768d77a1c8f1e7c8c09f755a5720caafe281e41 100644 (file)
@@ -498,8 +498,8 @@ public:
 
     // Other accessors
     void SetExt( const wxString &ext )          { m_ext = ext; m_hasExt = !m_ext.empty(); }
-    void ClearExt()                             { m_ext = wxEmptyString; m_hasExt = false; }
-    void SetEmptyExt()                          { m_ext = wxT(""); m_hasExt = true; }
+    void ClearExt()                             { m_ext.clear(); m_hasExt = false; }
+    void SetEmptyExt()                          { m_ext.clear(); m_hasExt = true; }
     wxString GetExt() const                     { return m_ext; }
     bool HasExt() const                         { return m_hasExt; }
 
index 6a40c2e74d85816f93cf243bf47a26a08d382846..d6d68aeeb6c2a3d731d9675779d4829012edef9e 100644 (file)
@@ -608,11 +608,10 @@ void wxFileName::AssignDir(const wxString& dir, wxPathFormat format)
 
 void wxFileName::Clear()
 {
-    m_dirs.Clear();
-
-    m_volume =
-    m_name =
-    m_ext = wxEmptyString;
+    m_dirs.clear();
+    m_volume.clear();
+    m_name.clear();
+    m_ext.clear();
 
     // we don't have any absolute path for now
     m_relative = true;
@@ -1912,7 +1911,7 @@ wxString wxFileName::GetForbiddenChars(wxPathFormat format)
         case wxPATH_MAC:
             // On a Mac even names with * and ? are allowed (Tested with OS
             // 9.2.1 and OS X 10.2.5)
-            strForbiddenChars = wxEmptyString;
+            strForbiddenChars.clear();
             break;
 
         case wxPATH_DOS:
@@ -2294,7 +2293,7 @@ wxString wxFileName::GetLongPath() const
                   GetVolumeSeparator(wxPATH_DOS) +
                   GetPathSeparator(wxPATH_DOS);
     else
-        pathOut = wxEmptyString;
+        pathOut.clear();
 
     wxArrayString dirs = GetDirs();
     dirs.Add(GetFullName());