diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-31 20:45:03 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-31 20:45:03 +0100 |
| commit | 8a14abe007fb7b265e875c99aef7f53d5d185f39 (patch) | |
| tree | f3ab19082038c4ca0a6c96d5f17a58e66b2471e0 /src/game_tab/right_panel/LiveEngineDialog.cpp | |
| parent | 21a5b3df8ac01d723d447d94b681ee329ee6b072 (diff) | |
Cleaning pointers related code
Diffstat (limited to 'src/game_tab/right_panel/LiveEngineDialog.cpp')
| -rw-r--r-- | src/game_tab/right_panel/LiveEngineDialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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(); |
