File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -76,21 +76,13 @@ namespace xtl
7676 {
7777 GetModuleHandleEx (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, reinterpret_cast <LPCTSTR>(module_path), &handle);
7878 }
79- #if defined(UNICODE)
80- if (GetModuleFileNameW (handle, buffer, sizeof (buffer)) != 0 )
79+ if (GetModuleFileName (handle, buffer, sizeof (buffer)) != 0 )
8180 {
8281 // Convert wchar_t to std::string
8382 std::wstring wideString (buffer);
8483 std::string narrowString (wideString.begin (), wideString.end ());
8584 path = narrowString;
8685 }
87- #else
88- if (GetModuleFileNameA (handle, buffer, sizeof (buffer)) != 0 )
89- {
90- path = buffer;
91- }
92- #endif
93- // failed to determine run path
9486#elif defined (__APPLE__)
9587 std::uint32_t size = sizeof (buffer);
9688 if (_NSGetExecutablePath (buffer, &size) == 0 )
You can’t perform that action at this time.
0 commit comments