diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index 604d9e3..8e1bdb3 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -15,7 +15,7 @@ using namespace std; #define IS(X) template::value>::type* = nullptr> struct ParseComponent { - [[nodiscard]] const type_info& getId() const { return typeid(*this); } + [[nodiscard]] constexpr const type_info& getId() const { return typeid(*this); } virtual ~ParseComponent() = default; }; diff --git a/src/headers/transpiler/Target.hpp b/src/headers/transpiler/Target.hpp index 21feae7..24eeec4 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -69,7 +69,7 @@ public: string transpileWithTree(const ParseTree& tree) { output.str(string()); for (const unique_ptr& component: tree) { - const type_info& id = (*component).getId(); + const type_info& id = component->getId(); with(StandardComponents::Define); with(StandardComponents::types::String); with(StandardComponents::Reference);