aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-31 20:45:03 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-31 20:45:03 +0100
commit8a14abe007fb7b265e875c99aef7f53d5d185f39 (patch)
treef3ab19082038c4ca0a6c96d5f17a58e66b2471e0 /src/game_tab/left_panel
parent21a5b3df8ac01d723d447d94b681ee329ee6b072 (diff)
Cleaning pointers related code
Diffstat (limited to 'src/game_tab/left_panel')
-rw-r--r--src/game_tab/left_panel/GameTabLeftPanel.cpp4
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp
index 71d44bf..70a09cd 100644
--- a/src/game_tab/left_panel/GameTabLeftPanel.cpp
+++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp
@@ -80,7 +80,7 @@ void GameTabLeftPanel::OnPlay(wxCommandEvent &event) {
std::string fen = game->GetFen();
std::map<char, std::uint8_t> captures;
HalfMove *m = game->GetCurrentMove();
- if (m != NULL) {
+ if (m != nullptr) {
captures = m->GetLineCaptures();
}
}
@@ -89,7 +89,7 @@ void GameTabLeftPanel::Notify(bool animate, bool backward) {
std::string fen = game->GetFen();
std::map<char, std::uint8_t> captures;
HalfMove *m = game->GetCurrentMove();
- if (m != NULL) {
+ if (m != nullptr) {
captures = m->GetLineCaptures();
}
diff --git a/src/game_tab/left_panel/board/BoardCanvas.cpp b/src/game_tab/left_panel/board/BoardCanvas.cpp
index 3e1744c..55e16f0 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.cpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.cpp
@@ -81,9 +81,9 @@ void BoardCanvas::OnPaint(wxPaintEvent &event) {
}
void BoardCanvas::ApplyPreferences() {
- if (t != NULL)
+ if (t != nullptr)
delete t;
- if (t_captures != NULL)
+ if (t_captures != nullptr)
delete t_captures;
t = new Theme();
t_captures = new Theme();