More warning and error fixes (work in progress with Tinderbox).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -241,7 +241,7 @@ public:
|
||||
// return true if we ignore this class entirely
|
||||
bool IgnoreClass(const wxString& classname) const
|
||||
{
|
||||
IgnoreListEntry ignore(classname, _T(""));
|
||||
IgnoreListEntry ignore(classname, wxEmptyString);
|
||||
|
||||
return m_ignore.Index(&ignore) != wxNOT_FOUND;
|
||||
}
|
||||
@@ -757,7 +757,7 @@ int main(int argc, char **argv)
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
if ( 0 && ctxTop )
|
||||
ctxTop->Dump("");
|
||||
ctxTop->Dump(wxEmptyString);
|
||||
#endif // __WXDEBUG__
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ void HelpGenVisitor::Reset()
|
||||
m_funcName =
|
||||
m_textFunc =
|
||||
m_textStoredTypedefs =
|
||||
m_textStoredFunctionComment = "";
|
||||
m_textStoredFunctionComment = wxEmptyString;
|
||||
|
||||
m_arrayFuncDocs.Empty();
|
||||
|
||||
@@ -1318,7 +1318,7 @@ void HelpGenVisitor::VisitParameter( spParameter& param )
|
||||
}
|
||||
|
||||
m_textFunc << "\\param{" << param.m_Type << " }{" << param.GetName();
|
||||
wxString defvalue = param.mInitVal;
|
||||
wxString defvalue = param.m_InitVal;
|
||||
if ( !defvalue.empty() ) {
|
||||
m_textFunc << " = " << defvalue;
|
||||
}
|
||||
@@ -1897,14 +1897,14 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( param.GetDefValue() != ctxParam->mInitVal.c_str() ) {
|
||||
if ( param.GetDefValue() != ctxParam->m_InitVal.c_str() ) {
|
||||
wxLogWarning("Default value of parameter '%s' of "
|
||||
"'%s::%s' should be '%s' and not "
|
||||
"'%s'.",
|
||||
ctxParam->m_Name.c_str(),
|
||||
nameClass.c_str(),
|
||||
nameMethod.c_str(),
|
||||
ctxParam->mInitVal.c_str(),
|
||||
ctxParam->m_InitVal.c_str(),
|
||||
param.GetDefValue().c_str());
|
||||
}
|
||||
}
|
||||
@@ -2022,7 +2022,7 @@ bool IgnoreNamesHandler::AddNamesFromFile(const wxString& filename)
|
||||
}
|
||||
else {
|
||||
// entire class
|
||||
m_ignore.Add(new IgnoreListEntry(line, ""));
|
||||
m_ignore.Add(new IgnoreListEntry(line, wxEmptyString));
|
||||
}
|
||||
}
|
||||
//else: comment
|
||||
@@ -2197,6 +2197,9 @@ static const wxString GetVersionString()
|
||||
|
||||
/*
|
||||
$Log$
|
||||
Revision 1.42 2005/05/31 15:32:49 ABX
|
||||
More warning and error fixes (work in progress with Tinderbox).
|
||||
|
||||
Revision 1.41 2005/05/30 13:06:15 ABX
|
||||
More warning and error fixes (work in progress with Tinderbox).
|
||||
|
||||
|
@@ -1734,7 +1734,7 @@ bool CJSourceParser::ParseArguments( char*& cur )
|
||||
continue;
|
||||
}
|
||||
|
||||
pPar->mInitVal = string( blocks[nameBlock], blockSizes[nameBlock] );
|
||||
pPar->m_InitVal = wxString( blocks[nameBlock], blockSizes[nameBlock] );
|
||||
|
||||
nameBlock = nameBlock - 2; // skip '=' token and default value block
|
||||
typeBlock = nameBlock - 1;
|
||||
@@ -1880,12 +1880,11 @@ void CJSourceParser::ParseMemberVar( char*& cur )
|
||||
// if comma, than variable list continues
|
||||
// otherwise the variable type reached - stop
|
||||
|
||||
if ( *cur == '=' )
|
||||
if ( *cur == _T('=') )
|
||||
{
|
||||
// yes, we've mistaken, it was not a identifier,
|
||||
// but it's default value
|
||||
pAttr->mInitVal =
|
||||
pAttr->m_Name;
|
||||
pAttr->m_InitVal = pAttr->m_Name;
|
||||
|
||||
// skip default value and '=' symbol
|
||||
skip_next_token_back( cur );
|
||||
|
@@ -35,12 +35,14 @@
|
||||
|
||||
size_t spInterFileContext::GetFileNo( const string& fname )
|
||||
{
|
||||
size_t i;
|
||||
for ( i = 0; i != mFiles.size(); ++i )
|
||||
for ( size_t i = 0; i != mFiles.size(); ++i )
|
||||
{
|
||||
if ( fname == mFiles[i] )
|
||||
return i;
|
||||
}
|
||||
|
||||
wxFAIL_MSG("File not found in array in function spInterFileContext::GetFileNo()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -136,7 +138,6 @@ void spInterFileContext::GenerateContextBody( spContext& ctx,
|
||||
size_t& lastKnownPos )
|
||||
{
|
||||
if ( ctx.PositionIsKnown() )
|
||||
|
||||
lastKnownPos = ctx.mSrcOffset;
|
||||
|
||||
if ( ctx.IsVirtualContext() )
|
||||
@@ -175,14 +176,13 @@ void spInterFileContext::GenerateContextBody( spContext& ctx,
|
||||
MMemberListT& lst = ctx.GetMembers();
|
||||
|
||||
for( size_t i = 0; i != lst.size(); ++i )
|
||||
|
||||
{
|
||||
GenerateContextBody( *lst[i], source, result, lastSavedPos, lastKnownPos );
|
||||
}
|
||||
|
||||
if ( ctx.IsVirtualContext() )
|
||||
{
|
||||
if ( ctx.VitualContextHasChildren() &&
|
||||
|
||||
ctx.GetFooterOfVirtualContextBody() != "" )
|
||||
if ( ctx.VitualContextHasChildren() && !ctx.GetFooterOfVirtualContextBody().empty() )
|
||||
{
|
||||
// append the reminder space after children of the context
|
||||
|
||||
@@ -276,22 +276,22 @@ void spInterFileContext::WriteToFiles()
|
||||
}
|
||||
}
|
||||
|
||||
string spInterFileContext::GetBody( spContext* pCtx )
|
||||
wxString spInterFileContext::GetBody( spContext* pCtx )
|
||||
{
|
||||
wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
|
||||
|
||||
string& source = mContents[ GetFileNoOfContext( *pCtx ) ];
|
||||
wxString& source = mContents[ GetFileNoOfContext( *pCtx ) ];
|
||||
|
||||
return string( source.c_str() + pCtx->mSrcOffset, pCtx->mContextLength );
|
||||
return wxString( source.c_str() + pCtx->mSrcOffset, pCtx->mContextLength );
|
||||
}
|
||||
|
||||
string spInterFileContext::GetHeader( spContext* pCtx )
|
||||
wxString spInterFileContext::GetHeader( spContext* pCtx )
|
||||
{
|
||||
wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
|
||||
|
||||
wxASSERT( pCtx->mHeaderLength != -1 ); // DBG:: -/-
|
||||
|
||||
string& source = mContents[ GetFileNoOfContext( *pCtx ) ];
|
||||
wxString& source = mContents[ GetFileNoOfContext( *pCtx ) ];
|
||||
|
||||
return string( source.c_str() + pCtx->mSrcOffset, pCtx->mHeaderLength );
|
||||
return wxString( source.c_str() + pCtx->mSrcOffset, pCtx->mHeaderLength );
|
||||
}
|
||||
|
@@ -91,9 +91,9 @@ public:
|
||||
|
||||
// overriden method of the base class (finds out the source fragment)
|
||||
|
||||
virtual string GetBody( spContext* pCtx = NULL );
|
||||
virtual wxString GetBody( spContext* pCtx = NULL );
|
||||
|
||||
virtual string GetHeader( spContext* pCtx = NULL );
|
||||
virtual wxString GetHeader( spContext* pCtx = NULL );
|
||||
};
|
||||
|
||||
|
||||
|
@@ -260,26 +260,23 @@ void spContext::SetVirtualContextBody( const string& body,
|
||||
mIsVirtualContext = true;
|
||||
}
|
||||
|
||||
string spContext::GetBody( spContext* pCtx )
|
||||
wxString spContext::GetBody( spContext* pCtx )
|
||||
{
|
||||
if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
|
||||
|
||||
return mVirtualContextBody;
|
||||
|
||||
if ( GetParent() )
|
||||
|
||||
return GetParent()->GetBody( ( pCtx != NULL ) ? pCtx : this );
|
||||
else
|
||||
return ""; // source-fragment cannot be found
|
||||
return wxEmptyString; // source-fragment cannot be found
|
||||
}
|
||||
|
||||
string spContext::GetHeader( spContext* pCtx )
|
||||
wxString spContext::GetHeader( spContext* pCtx )
|
||||
{
|
||||
if ( GetParent() )
|
||||
|
||||
return GetParent()->GetHeader( ( pCtx != NULL ) ? pCtx : this );
|
||||
else
|
||||
return ""; // source-fragment cannot be found
|
||||
return wxEmptyString; // source-fragment cannot be found
|
||||
}
|
||||
|
||||
bool spContext::IsFirstOccurence()
|
||||
@@ -421,12 +418,12 @@ spOperation::spOperation()
|
||||
mHasDefinition = false;
|
||||
}
|
||||
|
||||
string spOperation::GetFullName(MarkupTagsT tags)
|
||||
wxString spOperation::GetFullName(MarkupTagsT tags)
|
||||
{
|
||||
string txt = tags[TAG_BOLD].start + m_RetType;
|
||||
txt += " ";
|
||||
wxString txt = tags[TAG_BOLD].start + m_RetType;
|
||||
txt += _T(" ");
|
||||
txt += m_Name;
|
||||
txt += "( ";
|
||||
txt += _T("( ");
|
||||
txt += tags[TAG_BOLD].end;
|
||||
|
||||
for( size_t i = 0; i != mMembers.size(); ++i )
|
||||
@@ -437,7 +434,7 @@ string spOperation::GetFullName(MarkupTagsT tags)
|
||||
spParameter& param = *((spParameter*)mMembers[i]);
|
||||
|
||||
if ( i != 0 )
|
||||
txt += ", ";
|
||||
txt += _T(", ");
|
||||
|
||||
txt += tags[TAG_BOLD].start;
|
||||
|
||||
@@ -446,15 +443,15 @@ string spOperation::GetFullName(MarkupTagsT tags)
|
||||
txt += tags[TAG_BOLD].end;
|
||||
txt += tags[TAG_ITALIC].start;
|
||||
|
||||
txt += " ";
|
||||
txt += _T(" ");
|
||||
txt += param.m_Name;
|
||||
|
||||
if ( param.mInitVal != "" )
|
||||
if ( !param.m_InitVal.empty() )
|
||||
{
|
||||
txt += " = ";
|
||||
txt += _T(" = ");
|
||||
txt += tags[TAG_BOLD].start;
|
||||
|
||||
txt += param.mInitVal;
|
||||
txt += param.m_InitVal;
|
||||
|
||||
txt += tags[TAG_BOLD].end;
|
||||
}
|
||||
@@ -473,13 +470,13 @@ string spOperation::GetFullName(MarkupTagsT tags)
|
||||
|
||||
/***** Implemenentation for class spPreprocessorLine *****/
|
||||
|
||||
string spPreprocessorLine::CPP_GetIncludedFileNeme() const
|
||||
wxString spPreprocessorLine::CPP_GetIncludedFileNeme() const
|
||||
{
|
||||
wxASSERT( GetStatementType() == SP_PREP_DEF_INCLUDE_FILE );
|
||||
|
||||
size_t i = 0;
|
||||
|
||||
while( i < m_Line.length() && m_Line[i] != '"' && m_Line[i] != '<' )
|
||||
while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('<') )
|
||||
|
||||
++i;
|
||||
|
||||
@@ -487,19 +484,19 @@ string spPreprocessorLine::CPP_GetIncludedFileNeme() const
|
||||
|
||||
size_t start = i;
|
||||
|
||||
while( i < m_Line.length() && m_Line[i] != '"' && m_Line[i] != '>' )
|
||||
while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('>') )
|
||||
|
||||
++i;
|
||||
|
||||
if ( start < m_Line.length() )
|
||||
{
|
||||
string fname;
|
||||
wxString fname;
|
||||
fname.append( m_Line, start, ( i - start ) );
|
||||
|
||||
return fname;
|
||||
}
|
||||
else
|
||||
return ""; // syntax error probably
|
||||
return wxEmptyString; // syntax error probably
|
||||
}
|
||||
|
||||
|
||||
|
@@ -246,10 +246,10 @@ public:
|
||||
bool IsMultiline() const;
|
||||
bool StartsParagraph() const;
|
||||
|
||||
string& GetText();
|
||||
wxString& GetText();
|
||||
|
||||
// contstant version of GetText()
|
||||
string GetText() const;
|
||||
wxString GetText() const;
|
||||
};
|
||||
|
||||
// abstract base class for common (to most languages) code
|
||||
@@ -369,9 +369,9 @@ public:
|
||||
// can be overriden by top-level context classes
|
||||
// to find-out ot the source-fragment of this
|
||||
// context using it's position information
|
||||
virtual string GetBody( spContext* pCtx = NULL );
|
||||
virtual wxString GetBody( spContext* pCtx = NULL );
|
||||
|
||||
virtual string GetHeader( spContext* pCtx = NULL );
|
||||
virtual wxString GetHeader( spContext* pCtx = NULL );
|
||||
|
||||
// true, if there is at least one entry
|
||||
// in the comment list of this context
|
||||
@@ -503,7 +503,7 @@ public:
|
||||
wxString m_Type;
|
||||
|
||||
// "stringified" initial value
|
||||
string mInitVal;
|
||||
wxString m_InitVal;
|
||||
|
||||
public:
|
||||
virtual int GetContextType() const { return SP_CTX_PARAMETER; }
|
||||
@@ -524,7 +524,7 @@ public:
|
||||
wxString m_Type;
|
||||
|
||||
// it's initial value
|
||||
string mInitVal;
|
||||
wxString m_InitVal;
|
||||
|
||||
// constantness
|
||||
bool mIsConstant;
|
||||
@@ -580,7 +580,7 @@ public:
|
||||
// the default implementation outputs name in
|
||||
// C++/Java syntax
|
||||
|
||||
virtual string GetFullName(MarkupTagsT tags);
|
||||
virtual wxString GetFullName(MarkupTagsT tags);
|
||||
|
||||
virtual int GetContextType() const { return SP_CTX_OPERATION; }
|
||||
|
||||
@@ -609,7 +609,7 @@ public:
|
||||
|
||||
virtual int GetStatementType() const { return mDefType; }
|
||||
|
||||
string CPP_GetIncludedFileNeme() const;
|
||||
wxString CPP_GetIncludedFileNeme() const;
|
||||
|
||||
virtual void AcceptVisitor( spVisitor& visitor )
|
||||
{ visitor.VisitPreprocessorLine( *this ); }
|
||||
|
Reference in New Issue
Block a user