mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 12:03:25 -08:00
Apply nullptr across the tree (#7890)
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / vcpkg baseline (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Fedora 45 release (push) Blocked by required conditions
Build Desktop / Fedora 45 debug (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 sanitize (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 cover (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 27 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / Prune caches (push) Waiting to run
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / vcpkg baseline (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Fedora 45 release (push) Blocked by required conditions
Build Desktop / Fedora 45 debug (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 sanitize (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 cover (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 27 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / Prune caches (push) Waiting to run
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
This commit is contained in:
parent
fa523af857
commit
eb5672014d
26 changed files with 43 additions and 42 deletions
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
Server_Card::Server_Card(const CardRef &cardRef, int _id, int _coord_x, int _coord_y, Server_CardZone *_zone)
|
||||
: zone(_zone), id(_id), coord_x(_coord_x), coord_y(_coord_y), cardRef(cardRef), tapped(false), attacking(false),
|
||||
facedown(false), destroyOnZoneChange(false), doesntUntap(false), parentCard(0), stashedCard(nullptr)
|
||||
facedown(false), destroyOnZoneChange(false), doesntUntap(false), parentCard(nullptr), stashedCard(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ Server_Card::~Server_Card()
|
|||
{
|
||||
// setParentCard(0) leads to the item being removed from our list, so we can't iterate properly
|
||||
while (!attachedCards.isEmpty()) {
|
||||
attachedCards.first()->setParentCard(0);
|
||||
attachedCards.first()->setParentCard(nullptr);
|
||||
}
|
||||
|
||||
if (parentCard) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ Server_Game::~Server_Game()
|
|||
|
||||
room->removeGame(this);
|
||||
delete creatorInfo;
|
||||
creatorInfo = 0;
|
||||
creatorInfo = nullptr;
|
||||
|
||||
gameMutex.unlock();
|
||||
room->gamesLock.unlock();
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ public:
|
|||
void createGameJoinedEvent(Server_AbstractParticipant *participant, ResponseContainer &rc, bool resuming);
|
||||
|
||||
GameEventContainer *
|
||||
prepareGameEvent(const ::google::protobuf::Message &gameEvent, int playerId, GameEventContext *context = 0);
|
||||
prepareGameEvent(const ::google::protobuf::Message &gameEvent, int playerId, GameEventContext *context = nullptr);
|
||||
GameEventContext prepareGameEventContext(const ::google::protobuf::Message &gameEventContext);
|
||||
|
||||
void sendGameStateToPlayers();
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ public:
|
|||
}
|
||||
virtual DeckList *getDeckFromDatabase(int /* deckId */, int /* userId */)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
/** @brief One folder row of a user's deck storage tree. */
|
||||
struct DeckListFolderRecord
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public slots:
|
|||
void prepareDestroy();
|
||||
|
||||
public:
|
||||
Server_ProtocolHandler(Server *_server, Server_DatabaseInterface *_databaseInterface, QObject *parent = 0);
|
||||
Server_ProtocolHandler(Server *_server, Server_DatabaseInterface *_databaseInterface, QObject *parent = nullptr);
|
||||
~Server_ProtocolHandler();
|
||||
|
||||
bool getAcceptsUserListChanges() const
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ GameEventStorageItem::~GameEventStorageItem()
|
|||
delete event;
|
||||
}
|
||||
|
||||
GameEventStorage::GameEventStorage() : gameEventContext(0), privatePlayerId(0)
|
||||
GameEventStorage::GameEventStorage() : gameEventContext(nullptr), privatePlayerId(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ void GameEventStorage::sendToGame(Server_Game *game)
|
|||
game->sendGameEventContainer(contOthers, GameEventStorageItem::SendToOthers, id);
|
||||
}
|
||||
|
||||
ResponseContainer::ResponseContainer(int _cmdId) : cmdId(_cmdId), responseExtension(0)
|
||||
ResponseContainer::ResponseContainer(int _cmdId) : cmdId(_cmdId), responseExtension(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ void Server_Room::removeGame(Server_Game *game)
|
|||
// No need to lock gamesLock or gameMutex. This method is only
|
||||
// called from ~Server_Game, which locks both mutexes anyway beforehand.
|
||||
|
||||
disconnect(game, 0, this, 0);
|
||||
disconnect(game, nullptr, this, 0);
|
||||
|
||||
ServerInfo_Game gameInfo;
|
||||
game->getInfo(gameInfo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue