From 896a7af56205e9112f85f455216828b37746153d Mon Sep 17 00:00:00 2001 From: FutureRave Date: Sat, 15 Oct 2022 17:11:40 +0100 Subject: [PATCH] remove to_lower as everything is already lower case --- src/client/component/scripting.cpp | 3 --- src/client/game/scripting/functions.cpp | 1 - src/client/game/scripting/lua/context.cpp | 24 ++++++++++------------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/client/component/scripting.cpp b/src/client/component/scripting.cpp index 267b37e0..9177f60a 100644 --- a/src/client/component/scripting.cpp +++ b/src/client/component/scripting.cpp @@ -4,10 +4,8 @@ #include "game/game.hpp" #include "game/dvars.hpp" -#include "command.hpp" #include "scheduler.hpp" #include "scripting.hpp" -#include "console.hpp" #include "gsc.hpp" #include "game/scripting/event.hpp" @@ -17,7 +15,6 @@ #include #include -#include namespace scripting { diff --git a/src/client/game/scripting/functions.cpp b/src/client/game/scripting/functions.cpp index 32e9dffa..8f11e151 100644 --- a/src/client/game/scripting/functions.cpp +++ b/src/client/game/scripting/functions.cpp @@ -5,7 +5,6 @@ #include #include -#include #include diff --git a/src/client/game/scripting/lua/context.cpp b/src/client/game/scripting/lua/context.cpp index 4f8438b6..c2a5619d 100644 --- a/src/client/game/scripting/lua/context.cpp +++ b/src/client/game/scripting/lua/context.cpp @@ -3,22 +3,20 @@ #include "error.hpp" #include "value_conversion.hpp" -#include "../execution.hpp" -#include "../functions.hpp" +#include "game/scripting/execution.hpp" -#include "../../../component/notifies.hpp" -#include "../../../component/scripting.hpp" -#include "../../../component/command.hpp" -#include "../../../component/fastfiles.hpp" -#include "../../../component/mods.hpp" -#include "../../../component/localized_strings.hpp" -#include "../../../component/scheduler.hpp" +#include "component/notifies.hpp" +#include "component/scripting.hpp" +#include "component/command.hpp" +#include "component/fastfiles.hpp" +#include "component/mods.hpp" +#include "component/localized_strings.hpp" +#include "component/scheduler.hpp" #include "game/ui_scripting/execution.hpp" #include #include -#include #include #include @@ -342,8 +340,7 @@ namespace scripting::lua for (const auto& func : xsk::gsc::h2::resolver::get_methods()) { - const auto func_name = std::string(func.first); - const auto name = utils::string::to_lower(func_name); + const auto name = std::string(func.first); entity_type[name.data()] = [name](const entity& entity, const sol::this_state s, sol::variadic_args va) { std::vector arguments{}; @@ -476,8 +473,7 @@ namespace scripting::lua for (const auto& func : xsk::gsc::h2::resolver::get_functions()) { - const auto func_name = std::string(func.first); - const auto name = utils::string::to_lower(func_name); + const auto name = std::string(func.first); game_type[name] = [name](const game&, const sol::this_state s, sol::variadic_args va) { std::vector arguments{};