Skip to content

Commit

Permalink
Fix compiler warning about uninitialized member
Browse files Browse the repository at this point in the history
fHolder was also initialized before, but in a source file while the compiler seems to only have checked the header file. This moves the minimalistic code of the source file into the header file.
  • Loading branch information
2xB authored Jun 5, 2024
1 parent 8651496 commit a31bf66
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion Kassiopeia/Objects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ endforeach( BASENAME )
# source files
set( OBJECTS_SOURCE_BASENAMES
KSObjectsMessage.cxx
KSObject.cxx
KSCommand.cxx
KSCommandGroup.cxx
KSComponent.cxx
Expand Down
4 changes: 4 additions & 0 deletions Kassiopeia/Objects/Include/KSObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class KSObject : public katrin::KTagged
mutable KSHolder* fHolder;
};

KSObject::KSObject() : KTagged(), fHolder(nullptr) {}
KSObject::KSObject(const KSObject& aCopy) : KTagged(aCopy), fHolder(nullptr) {}
KSObject::~KSObject() = default;

inline KSObject::KSHolder::KSHolder() = default;
inline KSObject::KSHolder::~KSHolder() = default;

Expand Down
10 changes: 0 additions & 10 deletions Kassiopeia/Objects/Source/KSObject.cxx

This file was deleted.

0 comments on commit a31bf66

Please sign in to comment.