fixed Xcode 1.2 warnings; code cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth 2004-05-02 00:19:00 +00:00
parent 82b978d70d
commit 6f28211af2

View File

@ -332,7 +332,7 @@ void wxMemStruct::PrintNode ()
// Let's put this in standard form so IDEs can load the file at the appropriate
// line
wxString msg(wxT(""));
wxString msg;
if (m_fileName)
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
@ -350,7 +350,7 @@ void wxMemStruct::PrintNode ()
}
else
{
wxString msg(wxT(""));
wxString msg;
if (m_fileName)
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
@ -371,7 +371,7 @@ void wxMemStruct::Dump ()
{
wxObject *obj = (wxObject *)m_actualData;
wxString msg(wxT(""));
wxString msg;
if (m_fileName)
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
@ -388,7 +388,7 @@ void wxMemStruct::Dump ()
else
msg += wxT("unknown object class");
wxString msg2(wxT(""));
wxString msg2;
msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize());
msg += msg2;
@ -396,11 +396,11 @@ void wxMemStruct::Dump ()
}
else
{
wxString msg(wxT(""));
wxString msg;
if (m_fileName)
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
wxString msg2(wxT(""));
wxString msg2;
msg2.Printf(wxT("non-object data at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize() );
msg += msg2;
wxDebugContext::OutputDumpLine(msg);
@ -464,9 +464,9 @@ int wxMemStruct::ValidateNode ()
wxMemStruct *wxDebugContext::m_head = NULL;
wxMemStruct *wxDebugContext::m_tail = NULL;
bool wxDebugContext::m_checkPrevious = FALSE;
bool wxDebugContext::m_checkPrevious = false;
int wxDebugContext::debugLevel = 1;
bool wxDebugContext::debugOn = TRUE;
bool wxDebugContext::debugOn = true;
wxMemStruct *wxDebugContext::checkPoint = NULL;
// For faster alignment calculation
@ -597,9 +597,9 @@ bool wxDebugContext::PrintList (void)
#ifdef __WXDEBUG__
TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL));
return TRUE;
return true;
#else
return FALSE;
return false;
#endif
}
@ -608,7 +608,7 @@ bool wxDebugContext::Dump(void)
#ifdef __WXDEBUG__
{
wxChar* appName = (wxChar*) wxT("application");
wxString appNameStr(wxT(""));
wxString appNameStr;
if (wxTheApp)
{
appNameStr = wxTheApp->GetAppName();
@ -623,12 +623,12 @@ bool wxDebugContext::Dump(void)
TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL));
OutputDumpLine( wxT("") );
OutputDumpLine( wxT("") );
OutputDumpLine(wxEmptyString);
OutputDumpLine(wxEmptyString);
return TRUE;
return true;
#else
return FALSE;
return false;
#endif
}
@ -664,7 +664,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
#ifdef __WXDEBUG__
{
wxChar* appName = (wxChar*) wxT("application");
wxString appNameStr(wxT(""));
wxString appNameStr;
if (wxTheApp)
{
appNameStr = wxTheApp->GetAppName();
@ -678,7 +678,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
}
bool currentMode = GetDebugMode();
SetDebugMode(FALSE);
SetDebugMode(false);
long noNonObjectNodes = 0;
long noObjectNodes = 0;
@ -736,7 +736,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
list = old->next;
free((char *)old);
}
OutputDumpLine(wxT(""));
OutputDumpLine(wxEmptyString);
}
SetDebugMode(currentMode);
@ -744,13 +744,13 @@ bool wxDebugContext::PrintStatistics(bool detailed)
OutputDumpLine(wxT("Number of object items: %ld"), noObjectNodes);
OutputDumpLine(wxT("Number of non-object items: %ld"), noNonObjectNodes);
OutputDumpLine(wxT("Total allocated size: %ld"), totalSize);
OutputDumpLine(wxT(""));
OutputDumpLine(wxT(""));
OutputDumpLine(wxEmptyString);
OutputDumpLine(wxEmptyString);
return TRUE;
return true;
#else
(void)detailed;
return FALSE;
return false;
#endif
}
@ -758,7 +758,7 @@ bool wxDebugContext::PrintClasses(void)
{
{
wxChar* appName = (wxChar*) wxT("application");
wxString appNameStr(wxT(""));
wxString appNameStr;
if (wxTheApp)
{
appNameStr = wxTheApp->GetAppName();
@ -801,11 +801,11 @@ bool wxDebugContext::PrintClasses(void)
node = wxClassInfo::sm_classTable->Next();
n ++;
}
wxLogMessage(wxT(""));
wxLogMessage(wxEmptyString);
wxLogMessage(wxT("There are %d classes derived from wxObject."), n);
wxLogMessage(wxT(""));
wxLogMessage(wxT(""));
return TRUE;
wxLogMessage(wxEmptyString);
wxLogMessage(wxEmptyString);
return true;
}
void wxDebugContext::SetCheckpoint(bool all)
@ -884,13 +884,13 @@ void wxDebugContext::OutputDumpLine(const wxChar *szFormat, ...)
#if USE_THREADSAFE_MEMORY_ALLOCATION
static bool memSectionOk = FALSE;
static bool memSectionOk = false;
class MemoryCriticalSection : public wxCriticalSection
{
public:
MemoryCriticalSection() {
memSectionOk = TRUE;
memSectionOk = true;
}
};
@ -1111,7 +1111,7 @@ int wxDebugContextDumpDelayCounter::sm_count;
void wxDebugContextDumpDelayCounter::DoDump()
{
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
if (wxDebugContext::CountObjectsLeft(true) > 0)
{
wxDebugContext::OutputDumpLine(wxT("There were memory leaks.\n"));
wxDebugContext::Dump();