Fix annoying build warning
This commit is contained in:
@@ -12,14 +12,6 @@ namespace fs = std::filesystem;
|
||||
namespace hk {
|
||||
namespace sense_api {
|
||||
|
||||
struct DlCloser {
|
||||
void operator()(void* handle) const {
|
||||
if (handle) {
|
||||
dlclose(handle);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static std::optional<std::string> findLibraryPath(
|
||||
const std::string& libraryPath)
|
||||
{
|
||||
@@ -64,7 +56,7 @@ SenseApiLib& SenseApiManager::loadSenseApiLib(const std::string& libraryPath)
|
||||
|
||||
// Clear any existing error
|
||||
dlerror();
|
||||
auto dlopen_handle = std::unique_ptr<void, DlCloser>(
|
||||
auto dlopen_handle = std::unique_ptr<void, SenseApiLib::DlCloser>(
|
||||
dlopen(resolvedPath.c_str(), RTLD_LAZY));
|
||||
if (!dlopen_handle && fullPath.has_value())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user