X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68a602fcd2b0856bad6f79b957fa48beb6e10635..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/msw/snglinst.cpp diff --git a/src/msw/snglinst.cpp b/src/msw/snglinst.cpp index 0f9ba06276..3e9e23a1be 100644 --- a/src/msw/snglinst.cpp +++ b/src/msw/snglinst.cpp @@ -7,7 +7,7 @@ // Created: 08.06.01 // RCS-ID: $Id$ // Copyright: (c) 2001 Vadim Zeitlin -// License: wxWindows license +// License: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -18,10 +18,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "snglinst.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -61,18 +57,18 @@ public: { 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; @@ -95,6 +91,8 @@ private: // the mutex handle, may be NULL HANDLE m_hMutex; + + DECLARE_NO_COPY_CLASS(wxSingleInstanceCheckerImpl) }; // ============================================================================ @@ -102,7 +100,7 @@ private: // ============================================================================ bool wxSingleInstanceChecker::Create(const wxString& name, - const wxString& path) + const wxString& WXUNUSED(path)) { wxASSERT_MSG( !m_impl, _T("calling wxSingleInstanceChecker::Create() twice?") ); @@ -117,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