From 14d8318d10eb608300e006af3bc261690c14d041 Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Sat, 13 Sep 2008 04:55:23 +0400 Subject: [PATCH] parser: change order of the constructor optional arguments. Functions/methods having multiple optional arguments are not very convenient to use in C++ (to put it mildly). Shuffle parser ctor arguments so not so frequently used argument is the last one. --- ginac/parser/parser.cpp | 6 +++--- ginac/parser/parser.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ginac/parser/parser.cpp b/ginac/parser/parser.cpp index 1e905cf5..0ee682ab 100644 --- a/ginac/parser/parser.cpp +++ b/ginac/parser/parser.cpp @@ -150,9 +150,9 @@ int parser::get_next_tok() return token; } -parser::parser(const symtab& syms_, const prototype_table& funcs_, - const bool strict_) : strict(strict_), funcs(funcs_), - syms(syms_) +parser::parser(const symtab& syms_, const bool strict_, + const prototype_table& funcs_) : strict(strict_), + funcs(funcs_), syms(syms_) { scanner = new lexer(); } diff --git a/ginac/parser/parser.hpp b/ginac/parser/parser.hpp index dbe60ee0..eb50adc0 100644 --- a/ginac/parser/parser.hpp +++ b/ginac/parser/parser.hpp @@ -62,8 +62,8 @@ public: * symbol is encountered. */ parser(const symtab& syms_ = symtab(), - const prototype_table& funcs_ = get_default_reader(), - const bool strict_ = false); + const bool strict_ = false, + const prototype_table& funcs_ = get_default_reader()); ~parser(); /// parse the stream @a input -- 2.44.0