From 63b2117587b6446fd1470cb8c6262ec574a34dde Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Thu, 27 Jun 2019 13:57:19 +0200 Subject: [PATCH] macro processor: remove unnecessary includes --- src/macro/Directives.hh | 2 -- src/macro/Driver.cc | 1 - src/macro/Driver.hh | 2 -- src/macro/Environment.hh | 3 --- src/macro/Expressions.cc | 2 -- src/macro/Expressions.hh | 2 -- src/macro/Parser.yy | 5 ----- src/macro/Tokenizer.ll | 5 ----- 8 files changed, 22 deletions(-) diff --git a/src/macro/Directives.hh b/src/macro/Directives.hh index 314f3362..368eb496 100644 --- a/src/macro/Directives.hh +++ b/src/macro/Directives.hh @@ -22,8 +22,6 @@ #include "Expressions.hh" -using namespace std; - namespace macro { class Directive : public Node diff --git a/src/macro/Driver.cc b/src/macro/Driver.cc index d24469db..3635aaf2 100644 --- a/src/macro/Driver.cc +++ b/src/macro/Driver.cc @@ -20,7 +20,6 @@ #include "Driver.hh" #include <fstream> -#include <sstream> using namespace macro; diff --git a/src/macro/Driver.hh b/src/macro/Driver.hh index 5ba00ef3..b3010a15 100644 --- a/src/macro/Driver.hh +++ b/src/macro/Driver.hh @@ -30,8 +30,6 @@ #include <stack> -using namespace std; - // Declare TokenizerFlexLexer class #ifndef __FLEX_LEXER_H # define yyFlexLexer TokenizerFlexLexer diff --git a/src/macro/Environment.hh b/src/macro/Environment.hh index 78e34c8c..905905ff 100644 --- a/src/macro/Environment.hh +++ b/src/macro/Environment.hh @@ -23,9 +23,6 @@ #include "ForwardDeclarationsAndEnums.hh" #include <map> -#include <ostream> - -using namespace std; namespace macro { diff --git a/src/macro/Expressions.cc b/src/macro/Expressions.cc index a722a862..731cd4ab 100644 --- a/src/macro/Expressions.cc +++ b/src/macro/Expressions.cc @@ -19,8 +19,6 @@ #include "Expressions.hh" -#include <math.h> - using namespace macro; BoolPtr diff --git a/src/macro/Expressions.hh b/src/macro/Expressions.hh index e49b9846..11b25600 100644 --- a/src/macro/Expressions.hh +++ b/src/macro/Expressions.hh @@ -29,8 +29,6 @@ #include <sstream> #include <iomanip> -using namespace std; - namespace macro { class StackTrace final : public exception diff --git a/src/macro/Parser.yy b/src/macro/Parser.yy index 6aa08a39..87912f14 100644 --- a/src/macro/Parser.yy +++ b/src/macro/Parser.yy @@ -29,10 +29,6 @@ %code requires { namespace macro { class Driver; } -#include <ostream> -#include <vector> -#include <string> -using namespace std; } %param { macro::Driver &driver } @@ -45,7 +41,6 @@ using namespace std; }; %code requires { -#include "Expressions.hh" #include "Directives.hh" using namespace macro; } diff --git a/src/macro/Tokenizer.ll b/src/macro/Tokenizer.ll index a76d4314..fce6e6fb 100644 --- a/src/macro/Tokenizer.ll +++ b/src/macro/Tokenizer.ll @@ -21,11 +21,6 @@ %{ #include "Driver.hh" -#include <fstream> - -using namespace std; -using namespace macro; - // Announce to Flex the prototype we want for lexing function #define YY_DECL \ Tokenizer::parser::token_type \ -- GitLab