]> git.saurik.com Git - wxWidgets.git/commitdiff
Compilation fix for ANSI build after r61898.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 17 Sep 2009 13:02:12 +0000 (13:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 17 Sep 2009 13:02:12 +0000 (13:02 +0000)
wxWX2MBbuf is just char* if wxUSE_UNICODE==0 and so doesn't have a length()
method, use wxString::length() in wxFile::Write() instead.

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

src/common/file.cpp

index 8aaa9ac05e64ec4eddf1c2ab06831ad2bcf2c65f..2b837569a2ed06b9106a2998f8746933f3a83670 100644 (file)
@@ -312,7 +312,12 @@ bool wxFile::Write(const wxString& s, const wxMBConv& conv)
   if ( !buf )
       return false;
 
+#if wxUSE_UNICODE
   const size_t size = buf.length();
+#else
+  const size_t size = s.length();
+#endif
+
   return Write(buf, size) == size;
 }