summaryrefslogtreecommitdiff
path: root/src/gui/debugwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-27 01:27:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-27 01:27:11 +0300
commitde476bb95242e10c833394ef007728072eabe60f (patch)
tree033747127a7ea4e36de42cfc99fcee56ce915bbb /src/gui/debugwindow.cpp
parenta33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (diff)
downloadplus-de476bb95242e10c833394ef007728072eabe60f.tar.gz
plus-de476bb95242e10c833394ef007728072eabe60f.tar.bz2
plus-de476bb95242e10c833394ef007728072eabe60f.tar.xz
plus-de476bb95242e10c833394ef007728072eabe60f.zip
Add const to more classes.
Diffstat (limited to 'src/gui/debugwindow.cpp')
-rw-r--r--src/gui/debugwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index a3b077648..7bcec47ec 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -117,10 +117,10 @@ void DebugWindow::draw(gcn::Graphics *g)
if (player_node)
{
- Being *target = player_node->getTarget();
+ const Being *const target = player_node->getTarget();
if (target)
{
- Graphics *g2 = static_cast<Graphics*>(g);
+ Graphics *const g2 = static_cast<Graphics*>(g);
target->draw(g2, -target->getPixelX() + 16 + getWidth() / 2,
-target->getPixelY() + 32 + getHeight() / 2);
}
@@ -206,13 +206,13 @@ void MapDebugTab::logic()
mXYLabel->setCaption(strprintf("%s (?, ?)", _("Player Position:")));
}
- const Map *map = Game::instance()->getCurrentMap();
+ const Map *const map = Game::instance()->getCurrentMap();
if (map && viewport)
{
// Get the current mouse position
- int mouseTileX = (viewport->getMouseX() + viewport->getCameraX())
+ const int mouseTileX = (viewport->getMouseX() + viewport->getCameraX())
/ map->getTileWidth();
- int mouseTileY = (viewport->getMouseY() + viewport->getCameraY())
+ const int mouseTileY = (viewport->getMouseY() + viewport->getCameraY())
/ map->getTileHeight();
mTileMouseLabel->setCaption(strprintf("%s (%d, %d)",
_("Cursor:"), mouseTileX, mouseTileY));
@@ -297,7 +297,7 @@ void TargetDebugTab::logic()
{
if (player_node && player_node->getTarget())
{
- Being *target = player_node->getTarget();
+ const Being *const target = player_node->getTarget();
mTargetLabel->setCaption(strprintf("%s %s (%d, %d)", _("Target:"),
target->getName().c_str(), target->getTileX(),