summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-08 00:44:17 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-08 00:44:17 +0300
commit4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe (patch)
tree714897eca03fbcb764f5b450a29cc1aef8d33433 /src/game.cpp
parent9e83411f7e4147d09af5a5006888dcc187ea0ef8 (diff)
downloadplus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.gz
plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.bz2
plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.xz
plus-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.zip
Fix more gcc 4.7 warnings.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 6b595e8e1..f0964bbb4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -206,7 +206,7 @@ static void createGuiWindows()
tradeWindow = new TradeWindow;
equipmentWindow = new EquipmentWindow(PlayerInfo::getEquipment(),
player_node);
- beingEquipmentWindow = new EquipmentWindow(0, 0, true);
+ beingEquipmentWindow = new EquipmentWindow(nullptr, nullptr, true);
beingEquipmentWindow->setVisible(false);
statusWindow = new StatusWindow;
miniStatusWindow = new MiniStatusWindow;
@@ -263,7 +263,7 @@ static void createGuiWindows()
}
else
{
- tradeChatTab = 0;
+ tradeChatTab = nullptr;
}
if (config.getBoolValue("enableBattleTab"))
@@ -273,7 +273,7 @@ static void createGuiWindows()
}
else
{
- battleChatTab = 0;
+ battleChatTab = nullptr;
}
if (config.getBoolValue("logToChat"))
@@ -288,7 +288,7 @@ static void createGuiWindows()
Mana::Event::trigger(CHANNEL_GAME, Mana::Event(EVENT_GUIWINDOWSLOADED));
}
-#define del_0(X) { delete X; X = 0; }
+#define del_0(X) { delete X; X = nullptr; }
/**
* Destroy all the globally accessible gui windows
@@ -347,11 +347,11 @@ static void destroyGuiWindows()
guildManager->reload();
}
-Game *Game::mInstance = 0;
+Game *Game::mInstance = nullptr;
Game::Game():
mLastTarget(ActorSprite::UNKNOWN),
- mCurrentMap(0),
+ mCurrentMap(nullptr),
mMapName(""),
mValidSpeed(true),
mLastAction(0),
@@ -449,7 +449,7 @@ Game::~Game()
Being::clearCache();
- mInstance = 0;
+ mInstance = nullptr;
Mana::Event::trigger(CHANNEL_GAME, Mana::Event(EVENT_DESTRUCTED));
}
@@ -457,7 +457,7 @@ Game::~Game()
static bool saveScreenshot()
{
static unsigned int screenshotCount = 0;
- SDL_Surface *screenshot = 0;
+ SDL_Surface *screenshot = nullptr;
if (!config.getBoolValue("showip"))
{
@@ -542,7 +542,7 @@ void Game::logic()
if (mCurrentMap)
mCurrentMap->update();
- cur_time = static_cast<int>(time(0));
+ cur_time = static_cast<int>(time(nullptr));
Being::reReadConfig();
if (killStats)
killStats->recalcStats();
@@ -584,7 +584,7 @@ void Game::logic()
if (disconnectedDialog)
{
disconnectedDialog->scheduleDelete();
- disconnectedDialog = 0;
+ disconnectedDialog = nullptr;
}
}
}
@@ -1597,7 +1597,7 @@ void Game::handleInput()
if (keyboard.isKeyActive(keyboard.KEY_TARGET_ATTACK)
&& !keyboard.isKeyActive(keyboard.KEY_MOVE_TO_TARGET))
{
- Being *target = 0;
+ Being *target = nullptr;
bool newTarget = !keyboard.isKeyActive(keyboard.KEY_TARGET);
// A set target has highest priority
@@ -1717,7 +1717,7 @@ void Game::changeMap(const std::string &mapPath)
// Unset the map of the player so that its particles are cleared before
// being deleted in the next step
if (player_node)
- player_node->setMap(0);
+ player_node->setMap(nullptr);
if (particleEngine)
particleEngine->clear();
@@ -1887,6 +1887,6 @@ void Game::closeDialogs()
if (deathNotice)
{
deathNotice->scheduleDelete();
- deathNotice = 0;
+ deathNotice = nullptr;
}
}