Skip to content
Snippets Groups Projects
Commit d12f735d authored by Reinhard Biegel's avatar Reinhard Biegel
Browse files

Fix Spawner CreateInstance pointer type and usage

parent 5a99931f
No related branches found
No related tags found
No related merge requests found
......@@ -103,10 +103,10 @@ std::unique_ptr<SpawnPoint> SpawnPointLibrary::CreateSpawnPoint(const SpawnPoint
}
}
std::unique_ptr<SpawnPointInterface> spawnPoint = nullptr;
std::unique_ptr<SpawnPointInterface> spawnPoint;
try
{
spawnPoint = createInstanceFunc(&dependencies, callbacks);
spawnPoint.reset(createInstanceFunc(&dependencies, callbacks));
}
catch(std::runtime_error const &ex)
{
......
......@@ -35,8 +35,8 @@ class SpawnPointLibrary
{
public:
typedef const std::string &(*SpawnPointInterface_GetVersion)();
typedef std::unique_ptr<SpawnPointInterface> (*SpawnPointInterface_CreateInstanceType)(const SpawnPointDependencies* dependencies,
const CallbackInterface* callbacks);
typedef SpawnPointInterface* (*SpawnPointInterface_CreateInstanceType)(const SpawnPointDependencies* dependencies,
const CallbackInterface* callbacks);
SpawnPointLibrary(const std::string &libraryPath,
CallbackInterface *callbacks) :
......
......@@ -21,7 +21,7 @@ extern "C" SPAWNPOINT_SHARED_EXPORT const std::string &OpenPASS_GetVersion()
}
extern "C" SPAWNPOINT_SHARED_EXPORT SpawnPointInterface* OpenPASS_CreateInstance(const SpawnPointDependencies* dependencies,
const CallbackInterface* callbacks)
const CallbackInterface* callbacks)
{
Callbacks = callbacks;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment