Skip to content

Commit 8e84395

Browse files
committed
Make variable name more specific
1 parent b811ca2 commit 8e84395

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

gm_dotnet_native/dotnethelper-src/dotnethelper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ managed_delegate_executor_fn managed_delegate_executor = nullptr;
4949

5050
managed_main_fn managed_main = nullptr;
5151

52-
const std::filesystem::path bin_folder = _T("garrysmod/lua/bin");
53-
const std::filesystem::path hostfxr_path = (bin_folder / _T("dotnet/host/fxr") / NET_CORE_VERSION).make_preferred();
52+
const std::filesystem::path lua_bin_folder = _T("garrysmod/lua/bin");
53+
const std::filesystem::path hostfxr_path = (lua_bin_folder / _T("dotnet/host/fxr") / NET_CORE_VERSION).make_preferred();
5454
#ifdef WIN32
5555
HMODULE hostfxr_library_handle = LoadLibraryW((hostfxr_path / _T("hostfxr.dll")).c_str());
5656
#elif __APPLE__
@@ -173,8 +173,8 @@ extern "C" DYNAMIC_EXPORT cleanup_function_fn InitNetRuntime(GarrysMod::Lua::ILu
173173

174174
hostfxr_set_error_writer(dotnet_error_writer);
175175

176-
const auto gmodnet_dll_relative_path = bin_folder / _T("gmodnet/GmodNET.dll");
177-
const auto dotnet_root_path = (std::filesystem::current_path() / bin_folder / "dotnet").make_preferred();
176+
const auto gmodnet_dll_relative_path = lua_bin_folder / _T("gmodnet/GmodNET.dll");
177+
const auto dotnet_root_path = (std::filesystem::current_path() / lua_bin_folder / "dotnet").make_preferred();
178178

179179
const char_t* dotnet_args[] = {_T("exec"), gmodnet_dll_relative_path.c_str()};
180180

gm_dotnet_native/src/gm_dotnet.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ cleanup_function_fn cleanup_function = nullptr;
1919
//Invoked by Garry's Mod on module load
2020
GMOD_MODULE_OPEN()
2121
{
22-
const std::filesystem::path bin_folder("garrysmod/lua/bin");
22+
const std::filesystem::path lua_bin_folder("garrysmod/lua/bin");
2323

2424
// On Linux, modify SIGSEGV handling
2525
#ifdef __gnu_linux__
26-
void *linux_helper_handle = dlopen((bin_folder / "liblinuxhelper.so").c_str(), RTLD_LAZY);
26+
void *linux_helper_handle = dlopen((lua_bin_folder / "liblinuxhelper.so").c_str(), RTLD_LAZY);
2727
void (*pointer_to_install_sigsegv)(void);
2828
pointer_to_install_sigsegv = (void(*)())dlsym(linux_helper_handle, "install_sigsegv_handler");
2929
pointer_to_install_sigsegv();
@@ -40,13 +40,13 @@ GMOD_MODULE_OPEN()
4040
const char InitNetRuntime_fn_name[] = "InitNetRuntime";
4141

4242
#ifdef WIN32
43-
HMODULE dotnethelper_handle = LoadLibraryW((bin_folder / "dotnethelper.dll").make_preferred().c_str());
43+
HMODULE dotnethelper_handle = LoadLibraryW((lua_bin_folder / "dotnethelper.dll").make_preferred().c_str());
4444
if (dotnethelper_handle != nullptr)
4545
InitNetRuntime = reinterpret_cast<InitNetRuntime_fn>(GetProcAddress(dotnethelper_handle, InitNetRuntime_fn_name));
4646
#elif __APPLE__
47-
void* dotnethelper_handle = dlopen((bin_folder / "libdotnethelper.dylib").c_str(), RTLD_LAZY);
47+
void* dotnethelper_handle = dlopen((lua_bin_folder / "libdotnethelper.dylib").c_str(), RTLD_LAZY);
4848
#elif __gnu_linux__
49-
void* dotnethelper_handle = dlopen((bin_folder / "libdotnethelper.so").c_str(), RTLD_LAZY);
49+
void* dotnethelper_handle = dlopen((lua_bin_folder / "libdotnethelper.so").c_str(), RTLD_LAZY);
5050
#endif
5151

5252
#ifndef WIN32

0 commit comments

Comments
 (0)