Skip to content

Commit

Permalink
Add LineParser::atEndOfFile() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
trisyoungs committed Oct 19, 2018
1 parent 157ae83 commit 4e520ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/base/lineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,6 @@ bool LineParser::getNextArg(int optionMask, QString& destArg)
// Clear destination argument
destArg.clear();

if (endOfLine_)
{
// printf("Lineparser is at end of line - returning...\n");
return true;
}

while (linePos_ < lineLength_)
{
c = line_.at(linePos_).toLatin1();
Expand Down Expand Up @@ -1223,3 +1217,9 @@ bool LineParser::hasArg(int i) const
if ((i < 0) || (i >= nArgs())) return false;
return true;
}

// Return whether we are at the end of the current line
bool LineParser::atEndOfLine() const
{
return endOfLine_;
}
2 changes: 2 additions & 0 deletions src/base/lineparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ class LineParser
float argf(int i);
// Returns whether the specified argument exists
bool hasArg(int i) const;
// Return whether we are at the end of the current line
bool atEndOfLine() const;
};

ATEN_END_NAMESPACE
Expand Down

0 comments on commit 4e520ce

Please sign in to comment.