From e36fb2f10cd406fec22b8a5f63b9beffb554a508 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 6 Jul 2015 12:10:50 -0400 Subject: [PATCH] Lexer: Switched argument order for ::decomposePair --- src/Lexer.cpp | 4 ++-- test/lexer.t.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index 3064c575e..98aca3186 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -1226,8 +1226,8 @@ bool Lexer::decomposePair ( const std::string& text, std::string& name, std::string& modifier, - std::string& value, - std::string& separator) + std::string& separator, + std::string& value) { // Look for the required elements. std::string::size_type dot = text.find ('.'); diff --git a/test/lexer.t.cpp b/test/lexer.t.cpp index b78951b42..786851a44 100644 --- a/test/lexer.t.cpp +++ b/test/lexer.t.cpp @@ -200,7 +200,7 @@ int main (int argc, char** argv) for (auto& value : {"", "value", "a:b", "a::b", "a=b", "a:=b"}) { std::string input = std::string ("name") + (strlen (mod) ? "." : "") + mod + sep + value; - t.ok (Lexer::decomposePair (input, outName, outMod, outValue, outSep), "decomposePair '" + input + "' --> true"); + t.ok (Lexer::decomposePair (input, outName, outMod, outSep, outValue), "decomposePair '" + input + "' --> true"); t.is (name, outName, " '" + input + "' --> name '" + name + "'"); t.is (mod, outMod, " '" + input + "' --> mod '" + mod + "'"); t.is (value, outValue, " '" + input + "' --> value '" + value + "'");