Eliminate -Wcast-qual warnings with GCC and Clang

Use const_cast, mutable, and various other changes to avoid -Wcast-qual
This commit is contained in:
Paul Cornett
2020-02-02 22:50:32 -08:00
parent 6724f8c052
commit 948ddc6e0f
115 changed files with 273 additions and 303 deletions

View File

@@ -640,7 +640,7 @@ private:
wxThreadInternal *m_internal;
// protects access to any methods of wxThreadInternal object
wxCriticalSection m_critsect;
mutable wxCriticalSection m_critsect;
// true if the thread is detached, false if it is joinable
bool m_isDetached;
@@ -731,7 +731,7 @@ public:
// returns a pointer to the thread which can be used to call Run()
wxThread *GetThread() const
{
wxCriticalSectionLocker locker((wxCriticalSection&)m_critSection);
wxCriticalSectionLocker locker(m_critSection);
wxThread* thread = m_thread;
@@ -741,7 +741,7 @@ public:
protected:
wxThread *m_thread;
wxThreadKind m_kind;
wxCriticalSection m_critSection; // To guard the m_thread variable
mutable wxCriticalSection m_critSection; // To guard the m_thread variable
friend class wxThreadHelperThread;
};