TRUE, not true; FALSE not false
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -621,7 +621,7 @@ bool wxDebugContext::Dump(void)
|
|||||||
wxLogMessage( wxT("----- Memory dump -----") );
|
wxLogMessage( wxT("----- Memory dump -----") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL));
|
TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL));
|
||||||
|
|
||||||
wxLogMessage( wxT("") );
|
wxLogMessage( wxT("") );
|
||||||
@@ -860,13 +860,13 @@ int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
static bool memSectionOk = false;
|
static bool memSectionOk = FALSE;
|
||||||
|
|
||||||
class MemoryCriticalSection : public wxCriticalSection
|
class MemoryCriticalSection : public wxCriticalSection
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MemoryCriticalSection() {
|
MemoryCriticalSection() {
|
||||||
memSectionOk = true;
|
memSectionOk = TRUE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -876,12 +876,12 @@ public:
|
|||||||
inline MemoryCriticalSectionLocker(wxCriticalSection& critsect)
|
inline MemoryCriticalSectionLocker(wxCriticalSection& critsect)
|
||||||
: m_critsect(critsect), m_locked(memSectionOk) { if(m_locked) m_critsect.Enter(); }
|
: m_critsect(critsect), m_locked(memSectionOk) { if(m_locked) m_critsect.Enter(); }
|
||||||
inline ~MemoryCriticalSectionLocker() { if(m_locked) m_critsect.Leave(); }
|
inline ~MemoryCriticalSectionLocker() { if(m_locked) m_critsect.Leave(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// no assignment operator nor copy ctor
|
// no assignment operator nor copy ctor
|
||||||
MemoryCriticalSectionLocker(const MemoryCriticalSectionLocker&);
|
MemoryCriticalSectionLocker(const MemoryCriticalSectionLocker&);
|
||||||
MemoryCriticalSectionLocker& operator=(const MemoryCriticalSectionLocker&);
|
MemoryCriticalSectionLocker& operator=(const MemoryCriticalSectionLocker&);
|
||||||
|
|
||||||
wxCriticalSection& m_critsect;
|
wxCriticalSection& m_critsect;
|
||||||
bool m_locked;
|
bool m_locked;
|
||||||
};
|
};
|
||||||
@@ -895,7 +895,7 @@ void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject,
|
|||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
MemoryCriticalSectionLocker lock(memLocker);
|
MemoryCriticalSectionLocker lock(memLocker);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If not in debugging allocation mode, do the normal thing
|
// If not in debugging allocation mode, do the normal thing
|
||||||
// so we don't leave any trace of ourselves in the node list.
|
// so we don't leave any trace of ourselves in the node list.
|
||||||
|
|
||||||
@@ -955,7 +955,7 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
|
|||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
MemoryCriticalSectionLocker lock(memLocker);
|
MemoryCriticalSectionLocker lock(memLocker);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user