Commit 06321d62 authored by Julian Helfferich's avatar Julian Helfferich

Fix Coverity #76266: Initialize members, make constructor protected

FieldInterface is a purely abstract class used as a base class for
KBlocksField. Thus its constructor should be protected meaning that it
can be called during the construction of KBlocksField, but calling
FieldInterface fi = new FieldInterface() would fail.

Also, the member variables are now initialized to their default values
maBoard = nullptr, mWidth = 0, and mHeight = 0.
parent 2b096066
...@@ -12,8 +12,10 @@ ...@@ -12,8 +12,10 @@
class FieldInterface class FieldInterface
{ {
FieldInterface() : maBoard(nullptr), mHeight(0), mWidth(0) {};
public: public:
FieldInterface() {};
virtual ~FieldInterface() {}; virtual ~FieldInterface() {};
public: public:
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