General cleanup
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-07-04 18:24:49 +02:00
parent 0446c1098b
commit bb0a6aba19
20 changed files with 90 additions and 92 deletions

View File

@@ -33,7 +33,7 @@ namespace Porygon::Evaluation {
case BoundStatementKind::Script:
throw; // Should never happen
case BoundStatementKind::Block:
return this->EvaluateBlockStatement((BoundBlockStatement *) statement);
return this->EvaluateBlockStatement((BoundBlockStatement*)statement);
case BoundStatementKind::Expression:
return this->EvaluateExpressionStatement((BoundExpressionStatement *) statement);
case BoundStatementKind::Assignment:
@@ -382,7 +382,7 @@ namespace Porygon::Evaluation {
auto opt = func->GetOption(option->GetOptionId());
if (option -> IsScriptFunction()){
auto parameterTypes = option->GetParameterTypes();
auto scriptFunctionType = (ScriptFunctionOption*)option;
auto scriptFunctionType = dynamic_cast<const ScriptFunctionOption*>(option);
auto parameterKeys = scriptFunctionType->GetParameterKeys();
auto originalScope = this->_evaluationScope;
auto scriptOption = dynamic_pointer_cast<EvaluationScriptFunctionOption>(opt);
@@ -413,7 +413,7 @@ namespace Porygon::Evaluation {
const shared_ptr<EvalValue> Evaluator::EvaluateFunction(const GenericFunctionEvalValue *function,
const vector<EvalValue *> &parameters) {
auto type = std::dynamic_pointer_cast<GenericFunctionScriptType>(function->GetType());
auto option = (ScriptFunctionOption*)type-> GetFirstOption();
auto option = dynamic_cast<const ScriptFunctionOption*>(type->GetFirstOption());
auto parameterTypes = option->GetParameterTypes();
auto parameterKeys = option->GetParameterKeys();