From 81d57f602743c37a070347f74c3c584d3914f629 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 7 Jun 2019 12:35:43 +0200 Subject: [PATCH] Get rid of insert_or_assign functions on map, as mingw seems to be having trouble with it --- src/Evaluator/EvaluationScope/EvaluationScope.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Evaluator/EvaluationScope/EvaluationScope.cpp b/src/Evaluator/EvaluationScope/EvaluationScope.cpp index 2d30864..f267d02 100644 --- a/src/Evaluator/EvaluationScope/EvaluationScope.cpp +++ b/src/Evaluator/EvaluationScope/EvaluationScope.cpp @@ -10,20 +10,16 @@ EvaluationScope::EvaluationScope(unordered_map> *scri void EvaluationScope::CreateVariable(int scope, int id, shared_ptr value) { if (scope == 0){ -#if defined(__GNUC__) - _scriptScope->insert_or_assign(id, value); -#endif + _scriptScope->at(id) = value; } else{ -#if defined(__GNUC__) - _localScope[scope - 1].insert_or_assign(id, value); -#endif + _localScope[scope - 1][id] = value; } } void EvaluationScope::SetVariable(int scope, int id, shared_ptr value) { if (scope == 0){ #if defined(__GNUC__) - _scriptScope->insert_or_assign(id, value); + _scriptScope->at(id) = value; #endif } else{ _localScope[scope - 1][id] = value;