diff --git a/src/headers/transpiler/Target.hpp b/src/headers/transpiler/Target.hpp index 907e629..8d3f6b2 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -68,7 +68,7 @@ protected: typedef function task; #define make_task_base(type, captures, function_body) make_pair(type_index(typeid(type)), [captures](const ParseTree& parsedTree, unsigned int& index) { const type& parseComponent = pointerAs(parsedTree[index]); function_body }) #define make_task(T, F) make_task_base(T, this, F) - typedef unordered_map> unordered_task_map; + typedef unordered_map unordered_task_map; virtual unordered_task_map getTaskMap() = 0; public: const unordered_task_map& getTaskMapInstance() { @@ -93,8 +93,8 @@ public: const unique_ptr& component = tree[i]; const type_info& id = component->getId(); try { - const optional& currentTask = taskMap.at(id); - if (currentTask.has_value()) currentTask.value()(tree, i); + const task& currentTask = taskMap.at(id); + currentTask(tree, i); } catch (const out_of_range&) { throw Yerbacon::Exception(string( #ifndef __GNUC__