mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-11 04:23:29 -08:00
Apply nullptr across the tree
This commit is contained in:
parent
fa523af857
commit
82b9c3869e
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