Fix deleting incomplete type and make Engine moveable only
This commit is contained in:
parent
a4074332cc
commit
d572d77b48
@ -55,8 +55,8 @@ class Engine final
|
||||
|
||||
explicit Engine(EngineConfig &config);
|
||||
|
||||
Engine(const Engine &) = delete;
|
||||
Engine &operator=(const Engine &) = delete;
|
||||
Engine(Engine &&) noexcept;
|
||||
Engine &operator=(Engine &&) noexcept;
|
||||
|
||||
// Impl. in cpp since for unique_ptr of incomplete types
|
||||
~Engine();
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "engine/plugins/table.hpp"
|
||||
//#include "engine/plugins/hello_world.hpp"
|
||||
//#include "engine/plugins/nearest.hpp"
|
||||
#include "engine/plugins/nearest.hpp"
|
||||
//#include "engine/plugins/timestamp.hpp"
|
||||
//#include "engine/plugins/trip.hpp"
|
||||
#include "engine/plugins/viaroute.hpp"
|
||||
@ -140,9 +140,9 @@ Engine::Engine(EngineConfig &config)
|
||||
}
|
||||
|
||||
// make sure we deallocate the unique ptr at a position where we know the size of the plugins
|
||||
Engine::~Engine()
|
||||
{
|
||||
}
|
||||
Engine::~Engine() = default;
|
||||
Engine::Engine(Engine &&) noexcept = default;
|
||||
Engine &Engine::operator=(Engine &&) noexcept = default;
|
||||
|
||||
Status Engine::Route(const api::RouteParameters &route_parameters, util::json::Object &result)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user