Commit bc951650 authored by Jostein Bratlie's avatar Jostein Bratlie

Engine/EngineInterface class virual destructor and default copy/assignment bug fix.

parent 134af5e2
...@@ -39,8 +39,6 @@ namespace gameengine ...@@ -39,8 +39,6 @@ namespace gameengine
+ std::to_string(detail::computeBoardSize() - 1)); + std::to_string(detail::computeBoardSize() - 1));
} }
BitPos(const BitPos&) = default;
static constexpr BitPos invalid() static constexpr BitPos invalid()
{ {
return BitPos(); return BitPos();
......
...@@ -18,8 +18,9 @@ namespace gameengine ...@@ -18,8 +18,9 @@ namespace gameengine
class GameEngine : public GameEngineInterface { class GameEngine : public GameEngineInterface {
public: public:
// Inherit constructors // Constructors
using GameEngineInterface::GameEngineInterface; using GameEngineInterface::GameEngineInterface;
~GameEngine() override {}
// GameEngineInterface interface // GameEngineInterface interface
public: public:
......
...@@ -17,6 +17,9 @@ namespace gameengine ...@@ -17,6 +17,9 @@ namespace gameengine
class GameEngineInterface { class GameEngineInterface {
public: public:
/*! Destructor */
virtual ~GameEngineInterface() = 0;
/*! Init a new game for the set players */ /*! Init a new game for the set players */
virtual bool initNewGame() = 0; virtual bool initNewGame() = 0;
...@@ -48,6 +51,10 @@ namespace gameengine ...@@ -48,6 +51,10 @@ namespace gameengine
}; };
inline GameEngineInterface::~GameEngineInterface() {
} // Compulsory virtual destructor event though it is
// pure virtual
} // namespace gameengine } // namespace gameengine
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment