mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
refactor: don't call OsLibrary::load directly, use function pointer
this allows mocking this call in ULT Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
006285105d
commit
579af57161
@@ -26,11 +26,12 @@ struct ConvertibleProcAddr {
|
||||
class OsLibrary {
|
||||
protected:
|
||||
OsLibrary() = default;
|
||||
static OsLibrary *load(const std::string &name) { return loadAndCaptureError(name, nullptr); }
|
||||
|
||||
public:
|
||||
virtual ~OsLibrary() = default;
|
||||
|
||||
static OsLibrary *load(const std::string &name) { return loadAndCaptureError(name, nullptr); }
|
||||
static decltype(&OsLibrary::load) loadFunc;
|
||||
static OsLibrary *loadAndCaptureError(const std::string &name, std::string *errorValue);
|
||||
static const std::string createFullSystemPath(const std::string &name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user