2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[2375] Return a reference to the token

The copy is shallow anyway, so it wouldn't survive for long.
This commit is contained in:
Michal 'vorner' Vaner
2012-11-22 11:34:48 +01:00
parent 907061f81b
commit e27a2922bc
2 changed files with 2 additions and 2 deletions

View File

@@ -164,7 +164,7 @@ MasterLexer::getSourceLine() const {
return (impl_->sources_.back()->getCurrentLine());
}
MasterLexer::Token
const MasterLexer::Token&
MasterLexer::getNextToken(Options options) {
// If the source is not available
if (impl_->source_ == NULL) {

View File

@@ -213,7 +213,7 @@ public:
/// source (eg. I/O error in the file on the disk).
/// \throw std::bad_alloc in case allocation of some internal resources
/// or the token fail.
Token getNextToken(Options options = NONE);
const Token& getNextToken(Options options = NONE);
/// \brief Return the last token back to the lexer.
///