Get rid of insert_or_assign functions on map, as mingw seems to be having trouble with it
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4464cece57
commit
81d57f6027
|
@ -10,20 +10,16 @@ EvaluationScope::EvaluationScope(unordered_map<int, shared_ptr<EvalValue>> *scri
|
|||
|
||||
void EvaluationScope::CreateVariable(int scope, int id, shared_ptr<EvalValue> 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<EvalValue> value) {
|
||||
if (scope == 0){
|
||||
#if defined(__GNUC__)
|
||||
_scriptScope->insert_or_assign(id, value);
|
||||
_scriptScope->at(id) = value;
|
||||
#endif
|
||||
} else{
|
||||
_localScope[scope - 1][id] = value;
|
||||
|
|
Loading…
Reference in New Issue