From 845b9e0341c48b549054f0b728ec32b8815e0aed Mon Sep 17 00:00:00 2001 From: Edo Date: Tue, 29 Nov 2022 16:01:20 +0000 Subject: [PATCH] [Script]: Use .at instead of [] (#611) * [Script]: Use .at instead of [] * [Script]: Fix typo --- src/Components/Modules/GSC/Script.cpp | 4 ++-- src/STDInclude.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Components/Modules/GSC/Script.cpp b/src/Components/Modules/GSC/Script.cpp index 30126f84..19693cb5 100644 --- a/src/Components/Modules/GSC/Script.cpp +++ b/src/Components/Modules/GSC/Script.cpp @@ -340,7 +340,7 @@ namespace Components { for (const auto& func : CustomScrFunctions) { - const auto& name = func.aliases[0]; + const auto& name = func.aliases.at(0); Game::Scr_RegisterFunction(reinterpret_cast(func.actionFunc), name.data()); } } @@ -367,7 +367,7 @@ namespace Components { for (const auto& meth : CustomScrMethods) { - const auto& name = meth.aliases[0]; + const auto& name = meth.aliases.at(0); Game::Scr_RegisterFunction(reinterpret_cast(meth.actionFunc), name.data()); } } diff --git a/src/STDInclude.cpp b/src/STDInclude.cpp index 534f0160..81dd2b0a 100644 --- a/src/STDInclude.cpp +++ b/src/STDInclude.cpp @@ -78,37 +78,37 @@ static_assert(sizeof(intptr_t) == 4 && sizeof(void*) == 4 && sizeof(size_t) == 4 // ReSharper restore CppRedundantBooleanExpressionArgument #if !defined(_M_IX86) -#error "Invalid processor achritecture!" +#error "Invalid processor architecture!" #endif extern "C" { - // Disable telemetry data logging + // Disable telemetry data logging void __cdecl __vcrt_initialize_telemetry_provider() {} void __cdecl __telemetry_main_invoke_trigger() {} void __cdecl __telemetry_main_return_trigger() {} void __cdecl __vcrt_uninitialize_telemetry_provider() {} // Enable 'High Performance Graphics' - __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; + __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; // Tommath fixes - int s_read_arc4random(void*, size_t) + int s_read_arc4random(void*, std::size_t) { return -1; } - int s_read_getrandom(void*, size_t) + int s_read_getrandom(void*, std::size_t) { return -1; } - int s_read_urandom(void*, size_t) + int s_read_urandom(void*, std::size_t) { return -1; } - int s_read_ltm_rng(void*, size_t) + int s_read_ltm_rng(void*, std::size_t) { return -1; }