Added clang-tidy config and cleaned up the code a little.
This commit is contained in:
@@ -51,13 +51,13 @@ Result<LibraryHandle> openSharedLibrary(std::string_view libraryFile) noexcept
|
||||
{
|
||||
#if MIJIN_TARGET_OS == MIJIN_OS_LINUX
|
||||
const std::unique_lock dlErrorLock(gDlErrorMutex);
|
||||
dlerror();
|
||||
dlerror(); // NOLINT(concurrency-mt-unsafe) we take care of that
|
||||
|
||||
const fs::path libraryPath = fs::absolute(libraryFile);
|
||||
void* ptr = dlopen(libraryPath.c_str(), RTLD_NOW);
|
||||
if (ptr == nullptr)
|
||||
{
|
||||
return ResultError(dlerror());
|
||||
return ResultError(dlerror()); // NOLINT(concurrency-mt-unsafe) we take care of that
|
||||
}
|
||||
return LibraryHandle{.data = dlopen(libraryPath.c_str(), RTLD_NOW)};
|
||||
#elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS
|
||||
|
||||
Reference in New Issue
Block a user