X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/608a34bf5b95059789cda694a9b4257e282648e7..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index ae71d0ef12..7c494b4d71 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -14,10 +14,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "file.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -217,11 +213,9 @@ bool wxFile::Create(const wxChar *szFileName, bool bOverwrite, int accessMode) wxLogSysError(_("can't create file '%s'"), szFileName); return false; } - else - { - Attach(fd); - return true; - } + + Attach(fd); + return true; } // open the file @@ -271,10 +265,9 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) wxLogSysError(_("can't open file '%s'"), szFileName); return false; } - else { - Attach(fd); - return true; - } + + Attach(fd); + return true; } // close @@ -334,7 +327,7 @@ size_t wxFile::Write(const void *pBuf, size_t nCount) // flush bool wxFile::Flush() { -#if defined(__VISUALC__) || defined(HAVE_FSYNC) +#ifdef HAVE_FSYNC // fsync() only works on disk files and returns errors for pipes, don't // call it then if ( IsOpened() && GetKind() == wxFILE_KIND_DISK ) @@ -345,7 +338,7 @@ bool wxFile::Flush() return false; } } -#endif // fsync +#endif // HAVE_FSYNC return true; }