]> git.saurik.com Git - wxWidgets.git/commitdiff
Replace incorrect uses of wxString::empty() with the intended clear().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 29 Feb 2012 13:58:58 +0000 (13:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 29 Feb 2012 13:58:58 +0000 (13:58 +0000)
empty() doesn't empty the string but just checks for its emptiness, clear()
was supposed to be used here instead.

Thanks to PVS-Studio for finding these problems.

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

src/common/translation.cpp
src/msw/registry.cpp

index ea6d25955becee80aedfb4e1397a0842d6bb0947..bf586b24bb8c325c72933485a305737aa18be661 100644 (file)
@@ -986,7 +986,7 @@ bool wxMsgCatalogFile::LoadData(const DataBuffer& data,
                 if ( m_charset == wxS("CHARSET") )
                 {
                     // "CHARSET" is not valid charset, but lazy translator
-                    m_charset.empty();
+                    m_charset.clear();
                 }
             }
         }
index 83d11c2769845d5b465d17285fe780b61e5ff63d..948d9249fb4eee02421b035047a60e12135f22b2 100644 (file)
@@ -326,7 +326,7 @@ void wxRegKey::SetHkey(WXHKEY hKey)
   m_mode = Write;
 
   // reset old data
-  m_strKey.empty();
+  m_strKey.clear();
   m_dwLastError = 0;
 }