CodeReview Fix: GetLineNum()?

This commit is contained in:
kezenator 2016-11-29 19:50:27 +10:00
parent e353181a46
commit 19d8ea836f
2 changed files with 9 additions and 9 deletions

View File

@ -710,7 +710,7 @@ public:
void SetValue( const char* val, bool staticMem=false ); void SetValue( const char* val, bool staticMem=false );
/// Gets the line number the node is in, if the document was parsed from a file. /// Gets the line number the node is in, if the document was parsed from a file.
int GetParseLineNum() const { return _parseLineNum; } int GetLineNum() const { return _parseLineNum; }
/// Get the parent of this node on the DOM. /// Get the parent of this node on the DOM.
const XMLNode* Parent() const { const XMLNode* Parent() const {
@ -1094,7 +1094,7 @@ public:
const char* Value() const; const char* Value() const;
/// Gets the line number the attribute is in, if the document was parsed from a file. /// Gets the line number the attribute is in, if the document was parsed from a file.
int GetParseLineNum() const { return _parseLineNum; } int GetLineNum() const { return _parseLineNum; }
/// The next attribute in the list. /// The next attribute in the list.
const XMLAttribute* Next() const { const XMLAttribute* Next() const {

View File

@ -1687,34 +1687,34 @@ int main( int argc, const char ** argv )
bool VisitEnter(const XMLDocument& doc) bool VisitEnter(const XMLDocument& doc)
{ {
Push('D', doc.GetParseLineNum()); Push('D', doc.GetLineNum());
return true; return true;
} }
bool VisitEnter(const XMLElement& element, const XMLAttribute* firstAttribute) bool VisitEnter(const XMLElement& element, const XMLAttribute* firstAttribute)
{ {
Push('E', element.GetParseLineNum()); Push('E', element.GetLineNum());
for (const XMLAttribute *attr = firstAttribute; attr != 0; attr = attr->Next()) for (const XMLAttribute *attr = firstAttribute; attr != 0; attr = attr->Next())
Push('A', attr->GetParseLineNum()); Push('A', attr->GetLineNum());
return true; return true;
} }
bool Visit(const XMLDeclaration& declaration) bool Visit(const XMLDeclaration& declaration)
{ {
Push('L', declaration.GetParseLineNum()); Push('L', declaration.GetLineNum());
return true; return true;
} }
bool Visit(const XMLText& text) bool Visit(const XMLText& text)
{ {
Push('T', text.GetParseLineNum()); Push('T', text.GetLineNum());
return true; return true;
} }
bool Visit(const XMLComment& comment) bool Visit(const XMLComment& comment)
{ {
Push('C', comment.GetParseLineNum()); Push('C', comment.GetLineNum());
return true; return true;
} }
bool Visit(const XMLUnknown& unknown) bool Visit(const XMLUnknown& unknown)
{ {
Push('U', unknown.GetParseLineNum()); Push('U', unknown.GetLineNum());
return true; return true;
} }