Skip to content

Commit

Permalink
Use lower_bound in case there is no exact match for line number
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Mar 16, 2016
1 parent 43a7b9e commit e1d543d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/logfiltereddata.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class LogFilteredData : public AbstractLogData {
{
LineNumber lineIndex = std::numeric_limits<LineNumber>::max();
Iterator lowerBound = std::lower_bound( begin, end, lineNum );
if ( lowerBound != end && lowerBound->lineNumber() == lineNum ) {
if ( lowerBound != end ) {
lineIndex = std::distance(begin, lowerBound);
}

Expand Down

0 comments on commit e1d543d

Please sign in to comment.