X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd3f83f763c9356063eab6690689f9ac9b52f0c0..8a7afe4dfef33756855c0e7bd38cf20d0d9a9e2f:/include/wx/file.h diff --git a/include/wx/file.h b/include/wx/file.h index 5c193284d3..d3dd07ea3a 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -73,7 +73,7 @@ public: // def ctor wxFile() { m_fd = fd_invalid; m_error = false; } // open specified file (may fail, use IsOpened()) - wxFile(const wxChar *szFileName, OpenMode mode = read); + wxFile(const wxString& fileName, OpenMode mode = read); // attach to (already opened) file wxFile(int lfd) { m_fd = lfd; m_error = false; } @@ -97,17 +97,7 @@ public: // returns the number of bytes written size_t Write(const void *pBuf, size_t nCount); // returns true on success - bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8) - { - const wxWX2MBbuf buf = s.mb_str(conv); - if (buf) - { - size_t size = strlen(buf); - return Write((const char *) buf, size) == size; - } - else - return false; - } + bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8); // flush data not yet written bool Flush();