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 );
/// 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.
const XMLNode* Parent() const {
@ -1094,7 +1094,7 @@ public:
const char* Value() const;
/// 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.
const XMLAttribute* Next() const {

View File

@ -1687,34 +1687,34 @@ int main( int argc, const char ** argv )
bool VisitEnter(const XMLDocument& doc)
{
Push('D', doc.GetParseLineNum());
Push('D', doc.GetLineNum());
return true;
}
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())
Push('A', attr->GetParseLineNum());
Push('A', attr->GetLineNum());
return true;
}
bool Visit(const XMLDeclaration& declaration)
{
Push('L', declaration.GetParseLineNum());
Push('L', declaration.GetLineNum());
return true;
}
bool Visit(const XMLText& text)
{
Push('T', text.GetParseLineNum());
Push('T', text.GetLineNum());
return true;
}
bool Visit(const XMLComment& comment)
{
Push('C', comment.GetParseLineNum());
Push('C', comment.GetLineNum());
return true;
}
bool Visit(const XMLUnknown& unknown)
{
Push('U', unknown.GetParseLineNum());
Push('U', unknown.GetLineNum());
return true;
}