diff --git a/sim/src/core/opSimulation/bindings/spawnPointLibrary.cpp b/sim/src/core/opSimulation/bindings/spawnPointLibrary.cpp index 00bb502de03cbe0e2e67aab5f8c61038958bc040..62701a66aff26c4d4df6ec287c44384dadebdce5 100644 --- a/sim/src/core/opSimulation/bindings/spawnPointLibrary.cpp +++ b/sim/src/core/opSimulation/bindings/spawnPointLibrary.cpp @@ -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) { diff --git a/sim/src/core/opSimulation/bindings/spawnPointLibrary.h b/sim/src/core/opSimulation/bindings/spawnPointLibrary.h index b37116508254e95fa65f42dd6c4402a4601300ea..1f75f27553bd1e5d04bce5d71dd893957369c5fd 100644 --- a/sim/src/core/opSimulation/bindings/spawnPointLibrary.h +++ b/sim/src/core/opSimulation/bindings/spawnPointLibrary.h @@ -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) : diff --git a/sim/src/core/opSimulation/modules/Spawners/Scenario/SpawnerScenarioExport.cpp b/sim/src/core/opSimulation/modules/Spawners/Scenario/SpawnerScenarioExport.cpp index fa8aa6942016153b9b5458cafbb49de7d6d70a7a..92617a3c7a54dacf50e46fc1dbae5552a02dfbcc 100644 --- a/sim/src/core/opSimulation/modules/Spawners/Scenario/SpawnerScenarioExport.cpp +++ b/sim/src/core/opSimulation/modules/Spawners/Scenario/SpawnerScenarioExport.cpp @@ -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;