From 0cfa8737765c7422b4efabf782878638cedbb3c9 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 22 Jun 2015 10:19:47 -0400 Subject: [PATCH] CLI2: Fixed bug where a reference was being copied over --- src/CLI2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 2837aceb3..2f49d47af 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -1311,10 +1311,10 @@ void CLI2::desugarFilterPlainArgs () { bool changes = false; std::vector reconstructed; - auto& prev = _args[0]; + auto prev = &_args[0]; for (auto& a : _args) { - if (prev._lextype != Lexer::Type::op && + if (prev->_lextype != Lexer::Type::op && a.hasTag ("FILTER") && (a._lextype == Lexer::Type::dom || a._lextype == Lexer::Type::identifier || @@ -1342,7 +1342,7 @@ void CLI2::desugarFilterPlainArgs () else reconstructed.push_back (a); - prev = a; + prev = &a; } if (changes)