[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)
{
const auto& name = func.aliases[0];
const auto& name = func.aliases.at(0);
Game::Scr_RegisterFunction(reinterpret_cast<int>(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<int>(meth.actionFunc), name.data());
}
}

View File

@ -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;
}