Mingw doesn't seem to recognize intert_or_assign, so make it only use that on GCC
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
29561c7ef5
commit
4464cece57
|
@ -10,15 +10,21 @@ EvaluationScope::EvaluationScope(unordered_map<int, shared_ptr<EvalValue>> *scri
|
||||||
|
|
||||||
void EvaluationScope::CreateVariable(int scope, int id, shared_ptr<EvalValue> value) {
|
void EvaluationScope::CreateVariable(int scope, int id, shared_ptr<EvalValue> value) {
|
||||||
if (scope == 0){
|
if (scope == 0){
|
||||||
|
#if defined(__GNUC__)
|
||||||
_scriptScope->insert_or_assign(id, value);
|
_scriptScope->insert_or_assign(id, value);
|
||||||
|
#endif
|
||||||
} else{
|
} else{
|
||||||
|
#if defined(__GNUC__)
|
||||||
_localScope[scope - 1].insert_or_assign(id, value);
|
_localScope[scope - 1].insert_or_assign(id, value);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvaluationScope::SetVariable(int scope, int id, shared_ptr<EvalValue> value) {
|
void EvaluationScope::SetVariable(int scope, int id, shared_ptr<EvalValue> value) {
|
||||||
if (scope == 0){
|
if (scope == 0){
|
||||||
|
#if defined(__GNUC__)
|
||||||
_scriptScope->insert_or_assign(id, value);
|
_scriptScope->insert_or_assign(id, value);
|
||||||
|
#endif
|
||||||
} else{
|
} else{
|
||||||
_localScope[scope - 1][id] = value;
|
_localScope[scope - 1][id] = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue