[Script]: Use .at instead of [] (#611)

* [Script]: Use .at instead of []

* [Script]: Fix typo
This commit is contained in:
Edo 2022-11-29 16:01:20 +00:00 committed by GitHub
parent b195d96abb
commit 845b9e0341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -340,7 +340,7 @@ namespace Components
{ {
for (const auto& func : CustomScrFunctions) for (const auto& func : CustomScrFunctions)
{ {
const auto& name = func.aliases[0]; const auto& name = func.aliases.at(0);
Game::Scr_RegisterFunction(reinterpret_cast<int>(func.actionFunc), name.data()); Game::Scr_RegisterFunction(reinterpret_cast<int>(func.actionFunc), name.data());
} }
} }
@ -367,7 +367,7 @@ namespace Components
{ {
for (const auto& meth : CustomScrMethods) for (const auto& meth : CustomScrMethods)
{ {
const auto& name = meth.aliases[0]; const auto& name = meth.aliases.at(0);
Game::Scr_RegisterFunction(reinterpret_cast<int>(meth.actionFunc), name.data()); Game::Scr_RegisterFunction(reinterpret_cast<int>(meth.actionFunc), name.data());
} }
} }

View File

@ -78,7 +78,7 @@ static_assert(sizeof(intptr_t) == 4 && sizeof(void*) == 4 && sizeof(size_t) == 4
// ReSharper restore CppRedundantBooleanExpressionArgument // ReSharper restore CppRedundantBooleanExpressionArgument
#if !defined(_M_IX86) #if !defined(_M_IX86)
#error "Invalid processor achritecture!" #error "Invalid processor architecture!"
#endif #endif
extern "C" extern "C"
@ -93,22 +93,22 @@ extern "C"
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// Tommath fixes // Tommath fixes
int s_read_arc4random(void*, size_t) int s_read_arc4random(void*, std::size_t)
{ {
return -1; return -1;
} }
int s_read_getrandom(void*, size_t) int s_read_getrandom(void*, std::size_t)
{ {
return -1; return -1;
} }
int s_read_urandom(void*, size_t) int s_read_urandom(void*, std::size_t)
{ {
return -1; return -1;
} }
int s_read_ltm_rng(void*, size_t) int s_read_ltm_rng(void*, std::size_t)
{ {
return -1; return -1;
} }