aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-05-10 07:29:55 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-05-10 07:29:55 +0200
commit298714449a7c19c7a0f85d2f06305432f8a5251c (patch)
tree0acd6328ac4d29baca47d1599dd3789d2a28a012 /src
parent9a632b7d41eb6e12b18fb4f2f0cee817e4958d2f (diff)
Cleaning code and update CMI
Diffstat (limited to 'src')
-rw-r--r--src/components/Component.hpp1
-rw-r--r--src/components/MoveTable.cpp5
-rw-r--r--src/components/MoveTable.hpp3
3 files changed, 4 insertions, 5 deletions
diff --git a/src/components/Component.hpp b/src/components/Component.hpp
index 564660a..45e4390 100644
--- a/src/components/Component.hpp
+++ b/src/components/Component.hpp
@@ -12,6 +12,7 @@ protected:
public:
Component(Status *s) : status(s){};
+ virtual ~Component(){};
std::vector<Element> GetElements() { return (this->elements); }
virtual void Refresh() = 0;
virtual void SyncCache() {};
diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp
index 653356a..4878275 100644
--- a/src/components/MoveTable.cpp
+++ b/src/components/MoveTable.cpp
@@ -181,7 +181,7 @@ std::uint32_t MoveTable::UpdateMoves(CMI::HalfMove *m, std::uint32_t line,
//---------- Variations ----------
if (m->GetVariations().size() > 0) {
- line = DrawVariations(m, line, indent, move_bound, indent_black);
+ line = DrawVariations(m, line, indent, move_bound);
}
//---------- Mainline ----------
@@ -286,8 +286,7 @@ std::uint32_t MoveTable::DrawComment(CMI::HalfMove *m, std::uint32_t line,
std::uint32_t MoveTable::DrawVariations(CMI::HalfMove *m, std::uint32_t line,
std::uint32_t indent,
- const Element &move_bound,
- const char &indent_black) {
+ const Element &move_bound) {
// Show three dots next to move if white turn
if ((m->GetVariations().size() == 0) && !m->IsBlack()) {
DRAW_DOTS(status->MarginBarWidth + status->MoveWidth * (indent + 1),
diff --git a/src/components/MoveTable.hpp b/src/components/MoveTable.hpp
index e357287..1b6323e 100644
--- a/src/components/MoveTable.hpp
+++ b/src/components/MoveTable.hpp
@@ -60,8 +60,7 @@ class MoveTable : public Component {
std::uint32_t DrawComment(CMI::HalfMove *m, std::uint32_t line, std::uint32_t indent,
const Element &move_bound, const char &indent_black);
std::uint32_t DrawVariations(CMI::HalfMove *m, std::uint32_t line, std::uint32_t indent,
- const Element &move_bound,
- const char &indent_black);
+ const Element &move_bound);
public:
MoveTable(Status *s);
void Refresh();