From: Vadim Zeitlin Date: Thu, 17 Sep 2009 13:02:12 +0000 (+0000) Subject: Compilation fix for ANSI build after r61898. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ae0e22dd7af3fa44819a08c21c9b478688e9d172 Compilation fix for ANSI build after r61898. 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 --- diff --git a/src/common/file.cpp b/src/common/file.cpp index 8aaa9ac05e..2b837569a2 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -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; }