MinGW warning fixes. Source cleaning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-02-01 20:37:14 +00:00
parent e7694e3be8
commit eda6fa912b
3 changed files with 37 additions and 37 deletions

View File

@@ -37,8 +37,8 @@ void spVisitor::VisitAll( spContext& atContext,
bool sortContent bool sortContent
) )
{ {
mSiblingSkipped = FALSE; mSiblingSkipped = false;
mChildSkipped = FALSE; mChildSkipped = false;
mContextMask = SP_CTX_ANY; // FIXME:: should be an arg. mContextMask = SP_CTX_ANY; // FIXME:: should be an arg.
if ( sortContent && !atContext.IsSorted() ) if ( sortContent && !atContext.IsSorted() )
@@ -56,7 +56,7 @@ void spVisitor::VisitAll( spContext& atContext,
for( size_t i = 0; i != members.size(); ++i ) for( size_t i = 0; i != members.size(); ++i )
{ {
if ( mSiblingSkipped ) if ( mSiblingSkipped )
return; return;
if ( !mChildSkipped ) if ( !mChildSkipped )
@@ -84,12 +84,12 @@ void spVisitor::RemoveCurrentContext()
void spVisitor::SkipSiblings() void spVisitor::SkipSiblings()
{ {
mSiblingSkipped = TRUE; mSiblingSkipped = true;
} }
void spVisitor::SkipChildren() void spVisitor::SkipChildren()
{ {
mChildSkipped = TRUE; mChildSkipped = true;
} }
void spVisitor::SetFilter( int contextMask ) void spVisitor::SetFilter( int contextMask )
@@ -125,7 +125,7 @@ spContext::spContext()
: mpParent ( NULL ), : mpParent ( NULL ),
mpFirstOccurence( NULL ), mpFirstOccurence( NULL ),
mAlreadySorted ( FALSE ), mAlreadySorted ( false ),
mSrcLineNo (-1), mSrcLineNo (-1),
mSrcOffset (-1), mSrcOffset (-1),
@@ -140,8 +140,8 @@ spContext::spContext()
mVisibility( SP_VIS_PRIVATE ), mVisibility( SP_VIS_PRIVATE ),
mIsVirtualContext ( FALSE ), mIsVirtualContext ( false ),
mVirtualContextHasChildren( FALSE ), mVirtualContextHasChildren( false ),
mpUserData( NULL ) mpUserData( NULL )
{} {}
@@ -149,7 +149,7 @@ spContext::spContext()
void spContext::RemoveChildren() void spContext::RemoveChildren()
{ {
for( size_t i = 0; i != mMembers.size(); ++i ) for( size_t i = 0; i != mMembers.size(); ++i )
delete mMembers[i]; delete mMembers[i];
mMembers.erase( mMembers.begin(), mMembers.end() ); mMembers.erase( mMembers.begin(), mMembers.end() );
@@ -160,7 +160,7 @@ spContext::~spContext()
RemoveChildren(); RemoveChildren();
for( size_t i = 0; i != mComments.size(); ++i ) for( size_t i = 0; i != mComments.size(); ++i )
delete mComments[i]; delete mComments[i];
} }
@@ -201,7 +201,7 @@ void spContext::RemoveChild( spContext* pChild )
return; return;
} }
// the given child should exist on the parent's list // the given child should exist on the parent's list
wxASSERT( 0 ); wxASSERT( 0 );
} }
@@ -209,8 +209,8 @@ spContext* spContext::GetEnclosingContext( int mask )
{ {
spContext* cur = this->GetParent(); spContext* cur = this->GetParent();
while ( cur && !(cur->GetContextType() & mask) ) while ( cur && !(cur->GetContextType() & mask) )
cur = cur->GetParent(); cur = cur->GetParent();
return cur; return cur;
@@ -246,7 +246,7 @@ string spContext::GetFooterOfVirtualContextBody()
} }
void spContext::SetVirtualContextBody( const string& body, void spContext::SetVirtualContextBody( const string& body,
bool hasChildren, bool hasChildren,
const string& footer ) const string& footer )
{ {
@@ -257,13 +257,13 @@ void spContext::SetVirtualContextBody( const string& body,
// atuomaticllay becomes virtual context // atuomaticllay becomes virtual context
mIsVirtualContext = TRUE; mIsVirtualContext = true;
} }
string spContext::GetBody( spContext* pCtx ) string spContext::GetBody( spContext* pCtx )
{ {
if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext ) if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
return mVirtualContextBody; return mVirtualContextBody;
if ( GetParent() ) if ( GetParent() )
@@ -289,7 +289,7 @@ bool spContext::IsFirstOccurence()
spContext* spContext::GetFirstOccurence() spContext* spContext::GetFirstOccurence()
{ {
// this object should not itself be // this object should not itself be
// the first occurence of the context // the first occurence of the context
wxASSERT( mpFirstOccurence != 0 ); wxASSERT( mpFirstOccurence != 0 );
@@ -322,7 +322,7 @@ spContext* spContext::FindContext( const string& identifier,
{ {
spContext& member = *mMembers[i]; spContext& member = *mMembers[i];
if ( member.GetName() == identifier && if ( member.GetName() == identifier &&
( contextType & member.GetContextType() ) ( contextType & member.GetContextType() )
) )
@@ -330,7 +330,7 @@ spContext* spContext::FindContext( const string& identifier,
if ( searchSubMembers ) if ( searchSubMembers )
{ {
spContext* result = spContext* result =
member.FindContext( identifier, contextType, 1 ); member.FindContext( identifier, contextType, 1 );
if ( result ) return result; if ( result ) return result;
@@ -414,7 +414,7 @@ void spClass::SortMembers()
spOperation::spOperation() spOperation::spOperation()
: mHasDefinition( FALSE ) : mHasDefinition( false )
{ {
mIsConstant = mIsConstant =
mIsVirtual = mIsVirtual =
@@ -428,7 +428,7 @@ string spOperation::GetFullName(MarkupTagsT tags)
txt += mName; txt += mName;
txt += "( "; txt += "( ";
txt += tags[TAG_BOLD].end; txt += tags[TAG_BOLD].end;
for( size_t i = 0; i != mMembers.size(); ++i ) for( size_t i = 0; i != mMembers.size(); ++i )
{ {
// DBG:: // DBG::
@@ -438,9 +438,9 @@ string spOperation::GetFullName(MarkupTagsT tags)
if ( i != 0 ) if ( i != 0 )
txt += ", "; txt += ", ";
txt += tags[TAG_BOLD].start; txt += tags[TAG_BOLD].start;
txt += param.mType; txt += param.mType;
txt += tags[TAG_BOLD].end; txt += tags[TAG_BOLD].end;
@@ -479,15 +479,15 @@ string spPreprocessorLine::CPP_GetIncludedFileNeme() const
size_t i = 0; size_t i = 0;
while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '<' ) while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '<' )
++i; ++i;
++i; ++i;
size_t start = i; size_t start = i;
while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '>' ) while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '>' )
++i; ++i;
@@ -567,7 +567,7 @@ void spContext::Dump(const wxString& indent) const
} }
} }
void spContext::DumpThis(const wxString& indent) const void spContext::DumpThis(const wxString& WXUNUSED(indent)) const
{ {
wxFAIL_MSG("abstract base class can't be found in parser tree!"); wxFAIL_MSG("abstract base class can't be found in parser tree!");
} }

View File

@@ -77,14 +77,14 @@ IMPLEMENT_APP(wxEmulatorApp)
static const wxCmdLineEntryDesc sg_cmdLineDesc[] = static const wxCmdLineEntryDesc sg_cmdLineDesc[] =
{ {
{ wxCMD_LINE_OPTION, _T("u"), _T("use-display"), _T("display number to use (default 100)") }, { wxCMD_LINE_OPTION, _T("u"), _T("use-display"), _T("display number to use (default 100)"), (wxCmdLineParamType)0, 0 },
{ wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("displays help on the command line parameters") }, { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("displays help on the command line parameters"), (wxCmdLineParamType)0, 0 },
{ wxCMD_LINE_SWITCH, _T("v"), _T("version"), _T("print version") }, { wxCMD_LINE_SWITCH, _T("v"), _T("version"), _T("print version"), (wxCmdLineParamType)0, 0 },
{ wxCMD_LINE_PARAM, NULL, NULL, _T("config file 1"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_PARAM, NULL, NULL, _T("config file 1"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE } { wxCMD_LINE_NONE, NULL, NULL, NULL, (wxCmdLineParamType)0, 0 }
}; };
@@ -487,7 +487,7 @@ bool wxEmulatorInfo::Load(const wxString& appDir)
m_emulatorScreenSize = wxSize(w, h); m_emulatorScreenSize = wxSize(w, h);
} }
if (!m_emulatorBackgroundBitmapName.IsEmpty()) if (!m_emulatorBackgroundBitmapName.empty())
{ {
wxString absoluteBackgroundBitmapName = rootPath + wxString(wxFILE_SEP_PATH) + m_emulatorBackgroundBitmapName; wxString absoluteBackgroundBitmapName = rootPath + wxString(wxFILE_SEP_PATH) + m_emulatorBackgroundBitmapName;
if ( !wxFile::Exists(absoluteBackgroundBitmapName) ) if ( !wxFile::Exists(absoluteBackgroundBitmapName) )
@@ -575,10 +575,10 @@ wxString wxFindAppPath(const wxString& argv0, const wxString& cwd, const wxStrin
wxString str; wxString str;
// Try appVariableName // Try appVariableName
if (!appVariableName.IsEmpty()) if (!appVariableName.empty())
{ {
str = wxGetenv(appVariableName); str = wxGetenv(appVariableName);
if (!str.IsEmpty()) if (!str.empty())
return str; return str;
} }
@@ -602,7 +602,7 @@ wxString wxFindAppPath(const wxString& argv0, const wxString& cwd, const wxStrin
wxPathList pathList; wxPathList pathList;
pathList.AddEnvList(wxT("PATH")); pathList.AddEnvList(wxT("PATH"));
str = pathList.FindAbsoluteValidPath(argv0); str = pathList.FindAbsoluteValidPath(argv0);
if (!str.IsEmpty()) if (!str.empty())
return wxPathOnly(str); return wxPathOnly(str);
// Failed // Failed

View File

@@ -24,7 +24,7 @@ class wxEmulatorInfo: public wxObject
public: public:
wxEmulatorInfo() { Init(); } wxEmulatorInfo() { Init(); }
wxEmulatorInfo(const wxEmulatorInfo& info) { Init(); Copy(info); } wxEmulatorInfo(const wxEmulatorInfo& info) : wxObject() { Init(); Copy(info); }
void operator= (const wxEmulatorInfo& info) { Copy(info); } void operator= (const wxEmulatorInfo& info) { Copy(info); }
void Copy(const wxEmulatorInfo& info); void Copy(const wxEmulatorInfo& info);