aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/Game.cpp
diff options
context:
space:
mode:
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;
}