From 1ec029be9b53df2a05fa03186b6f50f6f5edb54f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 13 Jul 2015 16:44:55 -0400 Subject: [PATCH] Lexer: Relocated instantiation closer to first use --- src/Lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index 27e18255d..4ef11bc36 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -442,7 +442,6 @@ bool Lexer::isDate (std::string& token, Lexer::Type& type) bool Lexer::isDuration (std::string& token, Lexer::Type& type) { std::size_t marker = _cursor; - ISO8601p iso; std::string extractedToken; Lexer::Type extractedType; @@ -453,6 +452,7 @@ bool Lexer::isDuration (std::string& token, Lexer::Type& type) } marker = 0; + ISO8601p iso; if (iso.parse (_text.substr (_cursor), marker)) { type = Lexer::Type::duration;