Lexer: Relocated instantiation closer to first use

This commit is contained in:
Paul Beckingham 2015-07-13 16:44:55 -04:00
parent a7eb32272c
commit 1ec029be9b

View file

@ -442,7 +442,6 @@ bool Lexer::isDate (std::string& token, Lexer::Type& type)
bool Lexer::isDuration (std::string& token, Lexer::Type& type) bool Lexer::isDuration (std::string& token, Lexer::Type& type)
{ {
std::size_t marker = _cursor; std::size_t marker = _cursor;
ISO8601p iso;
std::string extractedToken; std::string extractedToken;
Lexer::Type extractedType; Lexer::Type extractedType;
@ -453,6 +452,7 @@ bool Lexer::isDuration (std::string& token, Lexer::Type& type)
} }
marker = 0; marker = 0;
ISO8601p iso;
if (iso.parse (_text.substr (_cursor), marker)) if (iso.parse (_text.substr (_cursor), marker))
{ {
type = Lexer::Type::duration; type = Lexer::Type::duration;