mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-03 02:37:39 +00:00
Cleaning pointers related code
This commit is contained in:
parent
21a5b3df8a
commit
8a14abe007
14 changed files with 63 additions and 63 deletions
|
@ -30,7 +30,7 @@ EngineTab::EngineTab(wxWindow *parent, uciadapter::UCI *engine,
|
|||
}
|
||||
|
||||
EngineTab::EngineTab(wxWindow *parent, std::string name)
|
||||
: TabEngine(parent), TabInfos(TabInfos::ENGINE), engine(NULL) {
|
||||
: TabEngine(parent), TabInfos(TabInfos::ENGINE), engine(nullptr) {
|
||||
SetLabel(name);
|
||||
engineName = name;
|
||||
confGroup = "engines/" + engineName;
|
||||
|
@ -45,7 +45,7 @@ EngineTab::EngineTab(wxWindow *parent, std::string name)
|
|||
}
|
||||
|
||||
EngineTab::~EngineTab() {
|
||||
if (engine != NULL) {
|
||||
if (engine != nullptr) {
|
||||
wxLogDebug("EngineTab destructor: destroying engine!");
|
||||
engine->quit();
|
||||
delete engine;
|
||||
|
|
|
@ -18,8 +18,8 @@ public:
|
|||
EngineTab(wxWindow *parent, std::string name);
|
||||
~EngineTab();
|
||||
void ApplyPreferences() {}
|
||||
std::shared_ptr<Game> GetGame() { return (std::shared_ptr<Game>(NULL)); }
|
||||
std::shared_ptr<GameBase> GetBase() { return (std::shared_ptr<GameBase>(NULL)); }
|
||||
std::shared_ptr<Game> GetGame() { return nullptr; }
|
||||
std::shared_ptr<GameBase> GetBase() { return nullptr; }
|
||||
void OnSave(wxCommandEvent &event);
|
||||
void OnDelete(wxCommandEvent &event);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue