Skip to content

Commit

Permalink
Use int to hold current character in CharIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneManushkin committed May 27, 2022
1 parent d588494 commit 3166dac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/token_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ CharIterator& CharIterator::operator++()
return *this;
}

char CharIterator::operator*() const
int CharIterator::operator*() const
{
return Current;
}
Expand Down
4 changes: 2 additions & 2 deletions src/token_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ class CharIterator
public:
CharIterator(FILE* f);
CharIterator& operator++();
char operator*() const;
int operator*() const;
long GetLineNumber() const;
long GetLineOffset() const;

private:
FILE* File;
char Current;
int Current;
long LineNumber;
long LineOffset;
};
Expand Down

0 comments on commit 3166dac

Please sign in to comment.