mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-14 15:47: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
|
@ -75,7 +75,7 @@ std::shared_ptr<Game> PGNGameBase::GetGame(std::uint32_t id) {
|
|||
}
|
||||
curid++;
|
||||
}
|
||||
return (std::shared_ptr<Game>(NULL));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void PGNGameBase::Save(std::vector<std::uint32_t> to_delete,
|
||||
|
@ -155,7 +155,7 @@ std::string PGNGameBase::GetPGN(std::shared_ptr<Game> g) {
|
|||
pgn += '[' + element + " \"" + g->GetTag(element) + "\"]\n";
|
||||
}
|
||||
|
||||
if(m !=NULL){
|
||||
if(m !=nullptr){
|
||||
pgn += GetMovesPGN(m,m->IsABlackMove());
|
||||
pgn += " ";
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ std::string PGNGameBase::GetMovesPGN(HalfMove *m, bool needDots) {
|
|||
}
|
||||
}
|
||||
|
||||
if (m->GetMainline() != NULL) {
|
||||
if (m->GetMainline() != nullptr) {
|
||||
part += " " + GetMovesPGN(m->GetMainline(), !m->IsABlackMove() && newNeedDots);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue