From 6284e991fcefae4893cdfb92e38115089989da53 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Tue, 4 Feb 2020 10:36:55 +0100
Subject: [PATCH] macro processor: remove unnecessary type specifiers

---
 src/macro/Directives.cc |  2 +-
 src/macro/Driver.cc     |  2 +-
 src/macro/Parser.yy     | 18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/macro/Directives.cc b/src/macro/Directives.cc
index 95d8860d..0cf5bcbb 100644
--- a/src/macro/Directives.cc
+++ b/src/macro/Directives.cc
@@ -75,7 +75,7 @@ Include::interpret(ostream &output, bool no_line_macro, vector<filesystem::path>
       // Calling `string()` method on filename and filename.stem() because of bug in
       // MinGW 8.3.0 that ignores implicit conversion to string from filename::path.
       // Test if bug exists when version of MinGW is upgraded on Debian runners
-      m.parse(filename.string(), filename.stem().string(), incfile, output, false, vector<pair<string, string>>{}, paths);
+      m.parse(filename.string(), filename.stem().string(), incfile, output, false, {}, paths);
     }
   catch (StackTrace &ex)
     {
diff --git a/src/macro/Driver.cc b/src/macro/Driver.cc
index f54ff3c1..76e3823c 100644
--- a/src/macro/Driver.cc
+++ b/src/macro/Driver.cc
@@ -37,7 +37,7 @@ Driver::parse(const string &file_arg, const string &basename_arg, istream &modfi
         command_line_defines_with_endl << "@#define " << var << " = " << val << endl;
       Driver m(env, true);
       istream is(command_line_defines_with_endl.rdbuf());
-      m.parse("command_line_defines", "command_line_defines", is, output, debug, vector<pair<string, string>>{}, paths);
+      m.parse("command_line_defines", "command_line_defines", is, output, debug, {}, paths);
     }
 
   // Handle empty files
diff --git a/src/macro/Parser.yy b/src/macro/Parser.yy
index 29090570..800a6554 100644
--- a/src/macro/Parser.yy
+++ b/src/macro/Parser.yy
@@ -154,7 +154,7 @@ directive_one_line : INCLUDE expr
                    ;
 
 name_list : NAME
-            { $$ = vector<string>{$1}; }
+            { $$ = {$1}; }
           | name_list NAME
             {
               $1.emplace_back($2);
@@ -229,13 +229,13 @@ if_list1 : expr EOL
            {
              auto context = driver.popContext();
              context.emplace_back(make_shared<TextNode>("\n", driver.env, @2));
-             $$ = vector<pair<ExpressionPtr, vector<DirectivePtr>>> {{$1, context}};
+             $$ = {{$1, context}};
            }
          | expr EOL statements
            {
              auto context = driver.popContext();
              context.emplace_back(make_shared<TextNode>("\n", driver.env, @3));
-             $$ = vector<pair<ExpressionPtr, vector<DirectivePtr>>> {{$1, context}};
+             $$ = {{$1, context}};
            }
          | if_list1 elseif
            {
@@ -297,25 +297,25 @@ function : NAME LPAREN RPAREN
          ;
 
 function_args : symbol
-                { $$ = vector<ExpressionPtr>{$1}; }
+                { $$ = {$1}; }
               | function_args COMMA symbol
                 { $1.emplace_back($3); $$ = $1; }
               ;
 
 comma_expr : %empty
-             { $$ = vector<ExpressionPtr>{}; }
+             { $$ = {}; }
            | expr
-             { $$ = vector<ExpressionPtr>{$1}; }
+             { $$ = {$1}; }
            | comma_expr COMMA expr
              { $1.emplace_back($3); $$ = $1; }
            ;
 
 tuple_comma_expr : %empty
-                   { $$ = vector<ExpressionPtr>{}; }
+                   { $$ = {}; }
                  | expr COMMA
-                   { $$ = vector<ExpressionPtr>{$1}; }
+                   { $$ = {$1}; }
                  | expr COMMA expr
-                   { $$ = vector<ExpressionPtr>{$1, $3}; }
+                   { $$ = {$1, $3}; }
                  | tuple_comma_expr COMMA expr
                    { $1.emplace_back($3); $$ = $1; }
                  ;
-- 
GitLab