From 8a14abe007fb7b265e875c99aef7f53d5d185f39 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 31 Dec 2022 20:45:03 +0100 Subject: Cleaning pointers related code --- src/game_tab/right_panel/LiveEngineDialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game_tab/right_panel/LiveEngineDialog.cpp') diff --git a/src/game_tab/right_panel/LiveEngineDialog.cpp b/src/game_tab/right_panel/LiveEngineDialog.cpp index dd24096..9184216 100644 --- a/src/game_tab/right_panel/LiveEngineDialog.cpp +++ b/src/game_tab/right_panel/LiveEngineDialog.cpp @@ -2,7 +2,7 @@ LiveEngineDialog::LiveEngineDialog(wxWindow *parent, std::string engine_name) : DialogLiveEngine(parent), engine_name(engine_name), interval(1000), - engine(NULL) { + engine(nullptr) { lines_list->InsertColumn(0, "#", wxLIST_FORMAT_LEFT, 50); lines_list->InsertColumn(1, "CP", wxLIST_FORMAT_LEFT, 70); lines_list->InsertColumn(2, "Line", wxLIST_FORMAT_LEFT, 300); @@ -14,14 +14,14 @@ LiveEngineDialog::LiveEngineDialog(wxWindow *parent, std::string engine_name) } LiveEngineDialog::~LiveEngineDialog() { - if (engine != NULL) { + if (engine != nullptr) { wxLogDebug("LiveEngineDialog destructor: delete engine"); delete engine; } } void LiveEngineDialog::InitEngine() { - if (engine == NULL) { + if (engine == nullptr) { wxLogDebug("Start engine: %s", engine_name); CONFIG_OPEN(conf); engine = new uciadapter::UCI( @@ -53,7 +53,7 @@ void LiveEngineDialog::InitEngine() { } void LiveEngineDialog::OnClose(wxCloseEvent &e) { - if (engine != NULL) { + if (engine != nullptr) { wxLogDebug("Close live engine!!"); timer.Stop(); engine->stop(); -- cgit v1.2.3