X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c9a19aabab3a878b565e6c2a5f2a3824277c4dc..950905affdfa9041316f82308e1a11e82c783070:/src/msw/snglinst.cpp diff --git a/src/msw/snglinst.cpp b/src/msw/snglinst.cpp index bf43276566..83f66d46a0 100644 --- a/src/msw/snglinst.cpp +++ b/src/msw/snglinst.cpp @@ -18,10 +18,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "snglinst.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -56,23 +52,23 @@ public: bool Create(const wxString& name) { - m_hMutex = ::CreateMutex(NULL, FALSE, name); + m_hMutex = ::CreateMutex(NULL, FALSE, name.wx_str()); if ( !m_hMutex ) { wxLogLastError(_T("CreateMutex")); - return FALSE; + return false; } // mutex was either created or opened - see what really happened m_wasOpened = ::GetLastError() == ERROR_ALREADY_EXISTS; - return TRUE; + return true; } bool WasOpened() const { - wxCHECK_MSG( m_hMutex, FALSE, + wxCHECK_MSG( m_hMutex, false, _T("can't be called if mutex creation failed") ); return m_wasOpened; @@ -119,7 +115,7 @@ bool wxSingleInstanceChecker::Create(const wxString& name, bool wxSingleInstanceChecker::IsAnotherRunning() const { - wxCHECK_MSG( m_impl, FALSE, _T("must call Create() first") ); + wxCHECK_MSG( m_impl, false, _T("must call Create() first") ); // if the mutex had been opened, another instance is running - otherwise we // would have created it