Skip to content

Commit 2bb8ada

Browse files
committed
Fix linter complaints
1 parent a4ea8b5 commit 2bb8ada

10 files changed

+68
-12
lines changed

Diff for: containers.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#include "./containers.h"
66
#include "./functions.h"
77

8-
using namespace cparse;
8+
using cparse::TokenMap;
9+
using cparse::packToken;
10+
using cparse::Iterator;
11+
using cparse::TokenList;
12+
using cparse::MapData_t;
913

1014
/* * * * * Initialize TokenMap * * * * */
1115

Diff for: containers.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,6 @@ class STuple : public Tuple {
243243
}
244244
};
245245

246-
}
246+
} // namespace cparse
247247

248248
#endif // CONTAINERS_H_

Diff for: functions.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
#include "./functions.h"
55
#include "./shunting-yard-exceptions.h"
66

7-
using namespace cparse;
7+
using cparse::packToken;
8+
using cparse::Function;
9+
using cparse::TokenList;
10+
using cparse::TokenMap;
11+
using cparse::CppFunction;
812

913
/* * * * * class Function * * * * */
1014
packToken Function::call(packToken _this, const Function* func,

Diff for: functions.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ class CppFunction : public Function {
5555
}
5656
};
5757

58-
}
58+
} // namespace cparse
5959

6060
#endif // FUNCTIONS_H_

Diff for: packToken.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
#include "./packToken.h"
77
#include "./shunting-yard-exceptions.h"
88

9-
using namespace cparse;
9+
using cparse::packToken;
10+
using cparse::TokenBase;
11+
using cparse::TokenMap;
12+
using cparse::TokenList;
13+
using cparse::Tuple;
14+
using cparse::STuple;
15+
using cparse::Function;
1016

1117
const packToken& packToken::None() {
1218
static packToken none = packToken(TokenNone());

Diff for: packToken.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ class packToken {
8888
};
8989

9090
// To allow cout to print it:
91-
std::ostream& operator<<(std::ostream& os, const packToken& t);
92-
}
91+
std::ostream& operator<<(std::ostream& os, const packToken& t);
92+
93+
} // namespace cparse
9394

9495
#endif // PACKTOKEN_H_

Diff for: shunting-yard-exceptions.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ struct undefined_operation : public msg_exception {
3939
: msg_exception("Unexpected operation with operator '" + op + "' and operands: " + left.str() + " and " + right.str() + ".") {}
4040
};
4141

42-
}
42+
} // namespace cparse
4343

4444
#endif // SHUNTING_YARD_EXCEPTIONS_H_

Diff for: shunting-yard.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,19 @@
1111
#include <utility> // For std::pair
1212
#include <cstring> // For strchr()
1313

14-
using namespace cparse;
14+
using cparse::calculator;
15+
using cparse::packToken;
16+
using cparse::TokenBase;
17+
using cparse::TokenMap;
18+
using cparse::RefToken;
19+
using cparse::Operation;
20+
using cparse::opID_t;
21+
using cparse::Config_t;
22+
using cparse::typeMap_t;
23+
using cparse::TokenQueue_t;
24+
using cparse::evaluationData;
25+
using cparse::rpnBuilder;
26+
using cparse::REF;
1527

1628
/* * * * * Operation class: * * * * */
1729

Diff for: shunting-yard.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class OppMap_t {
147147
bool exists(const std::string& op) const { return pr_map.count(op); }
148148
};
149149

150-
}
150+
} // namespace cparse
151151

152152
namespace cparse {
153153

@@ -431,6 +431,6 @@ class calculator {
431431
calculator& operator=(const calculator& calc);
432432
};
433433

434-
}
434+
} // namespace cparse
435435

436436
#endif // SHUNTING_YARD_H_

Diff for: test-shunting-yard.cpp

+30-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,36 @@
55

66
#include "./shunting-yard.h"
77

8-
using namespace cparse;
8+
using cparse::calculator;
9+
using cparse::packToken;
10+
using cparse::GlobalScope;
11+
using cparse::TokenMap;
12+
using cparse::TokenList;
13+
using cparse::Iterator;
14+
using cparse::CppFunction;
15+
using cparse::Tuple;
16+
using cparse::STuple;
17+
using cparse::TUPLE;
18+
using cparse::STUPLE;
19+
using cparse::MAP;
20+
using cparse::LIST;
21+
using cparse::BOOL;
22+
using cparse::NONE;
23+
using cparse::FUNC;
24+
using cparse::ANY_TYPE;
25+
using cparse::IT;
26+
using cparse::STR;
27+
using cparse::NUM;
28+
using cparse::UNARY;
29+
using cparse::REF;
30+
using cparse::Container;
31+
using cparse::evaluationData;
32+
using cparse::Operation;
33+
using cparse::Config_t;
34+
using cparse::rpnBuilder;
35+
using cparse::OppMap_t;
36+
using cparse::opMap_t;
37+
using cparse::parserMap_t;
938

1039
TokenMap vars, emap, tmap, key3;
1140

0 commit comments

Comments
 (0)