From 92177e515a0cc61371499e5f73363bd398012e9f Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 12 Apr 2021 12:34:31 +0200 Subject: [PATCH] Fix warning --- src/client/game/scripting/execution.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/client/game/scripting/execution.cpp b/src/client/game/scripting/execution.cpp index 2b4d354..a1d2492 100644 --- a/src/client/game/scripting/execution.cpp +++ b/src/client/game/scripting/execution.cpp @@ -93,7 +93,8 @@ namespace scripting if (!safe_execution::call(function, entref)) { - throw std::runtime_error("Error executing "s + (is_method_call ? "method" : "function") +" '" + name + "'"); + throw std::runtime_error( + "Error executing "s + (is_method_call ? "method" : "function") + " '" + name + "'"); } return get_return_value(); @@ -198,12 +199,8 @@ namespace scripting return value; } - else - { - // Add custom fields - return get_custom_field(entity, field); - } - return {}; + // Add custom fields + return get_custom_field(entity, field); } }