From e476446e75ef65a51fd62726aefc1ff46a444d14 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sat, 7 Mar 2015 14:06:16 +0100 Subject: [PATCH] Minor refactorings to Nodes.hpp 1. Convenience ctor for Id 2. Clean spaces and redudant things. --- Nodes.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Nodes.hpp b/Nodes.hpp index 0798724..e380297 100644 --- a/Nodes.hpp +++ b/Nodes.hpp @@ -82,6 +82,9 @@ private: class Id: public SimpleExpression { public: explicit Id(std::string *c): value(c) {} + explicit Id(char const* c) { + value = Pointer(new std::string(c)); + } virtual bool emit(Emitter *emitter) const { return emitter->emit(*this); @@ -307,7 +310,6 @@ private: Pointer> args; }; - class BranchCase { public: BranchCase(SemiExpression *c, PointerList *b): condition(c), body(b) {} @@ -462,7 +464,6 @@ namespace std { template<> struct hash { -public: size_t operator ()(const monicelli::Module &e) const noexcept { return e.hash(); }