diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-05-10 07:07:41 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-05-10 07:07:41 +0200 |
| commit | 14ac3bba33a037e4b46b3f7ec9ba05760145f288 (patch) | |
| tree | af834d0fafe5abeb882d7e476e134ccb189be8ef | |
| parent | 03ce4126cfa09ff0a55e70bdc44c1d5dd4035043 (diff) | |
Debug an cleaning source code
| -rw-r--r-- | src/CMI.cpp | 4 | ||||
| -rw-r--r-- | src/CMI.hpp | 6 | ||||
| -rw-r--r-- | tests/cmi_tests.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/CMI.cpp b/src/CMI.cpp index a57bceb..a50269a 100644 --- a/src/CMI.cpp +++ b/src/CMI.cpp @@ -6,11 +6,11 @@ HalfMove::HalfMove() : number(1), isBlack(false), NAG(0), parent(nullptr), mainline(nullptr) {} HalfMove::HalfMove(const std::string &SAN) - : number(1), isBlack(false), parent(nullptr), mainline(nullptr) {} + : SAN(SAN), number(1), isBlack(false), parent(nullptr), mainline(nullptr) {} HalfMove::HalfMove(const std::string &SAN, const std::string &comment, std::uint16_t number, std::uint8_t NAG, bool isBlack) - : SAN(SAN), comment(comment), number(number), NAG(NAG), isBlack(isBlack), + : SAN(SAN), comment(comment), number(number), isBlack(isBlack), NAG(NAG), parent(nullptr), mainline(nullptr) {} HalfMove::~HalfMove() { diff --git a/src/CMI.hpp b/src/CMI.hpp index 999a0dc..bab5f20 100644 --- a/src/CMI.hpp +++ b/src/CMI.hpp @@ -16,13 +16,13 @@ namespace CMI { */ class HalfMove { - HalfMove *parent; - HalfMove *mainline; std::vector<HalfMove *> variations; std::string SAN, comment; std::uint16_t number; - std::uint8_t NAG; bool isBlack; + std::uint8_t NAG; + HalfMove *parent; + HalfMove *mainline; /// @brief Set the parent of current CMI::HalfMove, only used internally void SetParent(HalfMove *); diff --git a/tests/cmi_tests.cpp b/tests/cmi_tests.cpp index a44b31a..c00585b 100644 --- a/tests/cmi_tests.cpp +++ b/tests/cmi_tests.cpp @@ -4,7 +4,7 @@ using namespace CMI; #define NEW_MOVE(VAR, SAN) \ - HalfMove *(VAR) = new HalfMove(); \ + HalfMove *VAR = new HalfMove(); \ (VAR)->SetSAN((SAN)); HalfMove *BuildTree() { |
