X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eda6fa912b538ead8c5aa6e06d25e0d0109a264f..effdccd8fda96caf3db17934864ef1ee236a1730:/utils/HelpGen/src/srcparser.cpp?ds=inline diff --git a/utils/HelpGen/src/srcparser.cpp b/utils/HelpGen/src/srcparser.cpp index 9895113751..166fc6ca7e 100644 --- a/utils/HelpGen/src/srcparser.cpp +++ b/utils/HelpGen/src/srcparser.cpp @@ -6,7 +6,7 @@ // Created: 22/09/98 // RCS-ID: $Id$ // Copyright: (c) Aleskandars Gluchovas -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -109,14 +109,14 @@ bool spComment::StartsParagraph() const return mStartsPar; } -string& spComment::GetText() +wxString& spComment::GetText() { - return mText; + return m_Text; } -string spComment::GetText() const +wxString spComment::GetText() const { - return mText; + return m_Text; } /***** Implementation for class spContext *****/ @@ -423,9 +423,9 @@ spOperation::spOperation() string spOperation::GetFullName(MarkupTagsT tags) { - string txt = tags[TAG_BOLD].start + mRetType; + string txt = tags[TAG_BOLD].start + m_RetType; txt += " "; - txt += mName; + txt += m_Name; txt += "( "; txt += tags[TAG_BOLD].end; @@ -441,13 +441,13 @@ string spOperation::GetFullName(MarkupTagsT tags) txt += tags[TAG_BOLD].start; - txt += param.mType; + txt += param.m_Type; txt += tags[TAG_BOLD].end; txt += tags[TAG_ITALIC].start; txt += " "; - txt += param.mName; + txt += param.m_Name; if ( param.mInitVal != "" ) { @@ -479,7 +479,7 @@ string spPreprocessorLine::CPP_GetIncludedFileNeme() const size_t i = 0; - while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '<' ) + while( i < m_Line.length() && m_Line[i] != '"' && m_Line[i] != '<' ) ++i; @@ -487,14 +487,14 @@ string spPreprocessorLine::CPP_GetIncludedFileNeme() const size_t start = i; - while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '>' ) + while( i < m_Line.length() && m_Line[i] != '"' && m_Line[i] != '>' ) ++i; - if ( start < mLine.length() ) + if ( start < m_Line.length() ) { string fname; - fname.append( mLine, start, ( i - start ) ); + fname.append( m_Line, start, ( i - start ) ); return fname; } @@ -533,7 +533,7 @@ spFile* SourceParserBase::ParseFile( const char* fname ) FILE* fp = fopen( fname, "rt" ); - if ( (int)fp == -1 || !fp ) return NULL; + if ( !fp ) return NULL; int sz = fread( mpFileBuf, 1, mFileBufSz, fp ); @@ -575,19 +575,19 @@ void spContext::DumpThis(const wxString& WXUNUSED(indent)) const void spParameter::DumpThis(const wxString& indent) const { wxLogDebug("%sparam named '%s' of type '%s'", - indent.c_str(), mName.c_str(), mType.c_str()); + indent.c_str(), m_Name.c_str(), m_Type.c_str()); } void spAttribute::DumpThis(const wxString& indent) const { wxLogDebug("%svariable named '%s' of type '%s'", - indent.c_str(), mName.c_str(), mType.c_str()); + indent.c_str(), m_Name.c_str(), m_Type.c_str()); } void spOperation::DumpThis(const wxString& indent) const { wxString protection; - if ( !!mScope ) { + if ( !mScope.empty() ) { switch ( mVisibility ) { case SP_VIS_PUBLIC: protection = "public"; @@ -614,7 +614,7 @@ void spOperation::DumpThis(const wxString& indent) const mIsConstant ? "const " : "", mIsVirtual ? "virtual " : "", protection.c_str(), - mScope.c_str(), mName.c_str(), mRetType.c_str()); + mScope.c_str(), m_Name.c_str(), m_RetType.c_str()); } void spPreprocessorLine::DumpThis(const wxString& indent) const @@ -649,7 +649,7 @@ void spClass::DumpThis(const wxString& indent) const for ( StrListT::const_iterator i = mSuperClassNames.begin(); i != mSuperClassNames.end(); i++ ) { - if ( !!base ) + if ( !base.empty() ) base += ", "; base += *i; } @@ -685,19 +685,19 @@ void spClass::DumpThis(const wxString& indent) const wxLogDebug("%s%s named '%s' (base classes: %s)", indent.c_str(), kind.c_str(), - mName.c_str(), base.c_str()); + m_Name.c_str(), base.c_str()); } void spEnumeration::DumpThis(const wxString& indent) const { wxLogDebug("%senum named '%s'", - indent.c_str(), mName.c_str()); + indent.c_str(), m_Name.c_str()); } void spTypeDef::DumpThis(const wxString& indent) const { wxLogDebug("%stypedef %s = %s", - indent.c_str(), mName.c_str(), mOriginalType.c_str()); + indent.c_str(), m_Name.c_str(), m_OriginalType.c_str()); } void spFile::DumpThis(const wxString& indent) const