]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/variant.cpp
Ambiguous overload fix for gcc
[wxWidgets.git] / src / common / variant.cpp
index 466d35983017584a04704b8e684918d7ca0ceeff..b9e2c48cc537cdf22090d7f9bef0593922fa6535 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "variant.h"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -1068,7 +1064,7 @@ bool wxVariantDataDateTime::Eq(wxVariantData& data) const
 
 
 #if wxUSE_STD_IOSTREAM
-bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
+bool wxVariantDataDateTime::Write(wxSTD ostream& WXUNUSED(str)) const
 {
     // Not implemented
     return false;
@@ -1156,7 +1152,7 @@ bool wxVariantDataArrayString::Eq(wxVariantData& data) const
 
 
 #if wxUSE_STD_IOSTREAM
-bool wxVariantDataArrayString::Write(wxSTD ostream& str) const
+bool wxVariantDataArrayString::Write(wxSTD ostream& WXUNUSED(str)) const
 {
     // Not implemented
     return false;
@@ -1938,7 +1934,7 @@ wxStringList& wxVariant::GetStringList() const
 void wxVariant::NullList()
 {
     SetData(new wxVariantDataList());
-};
+}
 
 // Append to list
 void wxVariant::Append(const wxVariant& value)
@@ -2038,9 +2034,9 @@ bool wxVariant::Convert(bool* value) const
     {
         wxString val(((wxVariantDataString*)GetData())->GetValue());
         val.MakeLower();
-        if (val == wxT("true") || val == wxT("yes"))
+        if (val == wxT("true") || val == wxT("yes") || val == wxT('1') )
             *value = true;
-        else if (val == wxT("false") || val == wxT("no"))
+        else if (val == wxT("false") || val == wxT("no") || val == wxT('0') )
             *value = false;
         else
             return false;