aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/Game.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-19 16:33:44 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-19 16:33:44 +0100
commita1289dec3dcec278f9cf6d18a001b3146b11b7b2 (patch)
tree99fcdcba7f08f57994ec11c4c68c87339dff8ef3 /src/game_tab/Game.cpp
parentaa6ec0ea601ac2a0b11752d210ce67fdb85ee60f (diff)
Integrate CMI
Diffstat (limited to 'src/game_tab/Game.cpp')
-rw-r--r--src/game_tab/Game.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game_tab/Game.cpp b/src/game_tab/Game.cpp
index c1aa605..ac1f428 100644
--- a/src/game_tab/Game.cpp
+++ b/src/game_tab/Game.cpp
@@ -53,7 +53,7 @@ bool Game::IsBlackToPlay() {
if (current == nullptr) {
return (false);
}
- return (!current->IsBlack);
+ return (!current->IsBlack());
}
void Game::DeleteTag(std::string tagname) { tags.erase(tagname); }
@@ -65,7 +65,7 @@ void Game::DeleteMove(HalfMove *m) {
delete m;
} else {
if (m != nullptr) {
- current = m->GetParent();
+ current = static_cast<HalfMove*>(m->GetParent());
if (current != nullptr) {
current->RemoveChild(m);
}
@@ -153,7 +153,7 @@ void Game::GetOpening(std::string &name,std::string &eco){
void Game::Previous() {
if (current != nullptr) {
- current = current->GetParent();
+ current = static_cast<HalfMove*>(current->GetParent());
}
}
@@ -167,7 +167,7 @@ std::vector<std::string> Game::ListTags() {
void Game::Next() {
if (current != nullptr) {
- HalfMove *m = current->GetMainline();
+ HalfMove *m = static_cast<HalfMove*>(current->GetMainline());
if (m != nullptr) {
current = m;
}
@@ -178,7 +178,7 @@ void Game::Next() {
HalfMove *Game::GetNextMove(){
if(current!=nullptr)
- return current->GetMainline();
+ return static_cast<HalfMove*>(current->GetMainline());
return moves;
}