summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-27 21:18:46 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-27 21:44:17 +0300
commit7c79aa2b8e484319e3e511fa21db6d2448347024 (patch)
tree3c4fb4e72414dd8c0d93401a6bf2cc86b65a34a0 /src/gui/minimap.cpp
parentde476bb95242e10c833394ef007728072eabe60f (diff)
downloadmanaverse-7c79aa2b8e484319e3e511fa21db6d2448347024.tar.gz
manaverse-7c79aa2b8e484319e3e511fa21db6d2448347024.tar.bz2
manaverse-7c79aa2b8e484319e3e511fa21db6d2448347024.tar.xz
manaverse-7c79aa2b8e484319e3e511fa21db6d2448347024.zip
Add const to more classes.
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r--src/gui/minimap.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 8cbeebad8..d928e6f8c 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -84,7 +84,7 @@ Minimap::~Minimap()
}
}
-void Minimap::setMap(Map *map)
+void Minimap::setMap(const Map *const map)
{
std::string caption("");
std::string minimapName;
@@ -111,7 +111,7 @@ void Minimap::setMap(Map *map)
{
if (config.getBoolValue("showExtMinimaps"))
{
- SDL_Surface* surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
+ SDL_Surface *const surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
map->getWidth(), map->getHeight(), 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000);
if (!surface)
@@ -148,7 +148,7 @@ void Minimap::setMap(Map *map)
{
std::string tempname = paths.getStringValue("minimaps")
+ "graphics/minimaps/" + map->getFilename() + ".png";
- ResourceManager *resman = ResourceManager::getInstance();
+ ResourceManager *const resman = ResourceManager::getInstance();
minimapName = map->getProperty("minimap");
@@ -208,7 +208,7 @@ void Minimap::draw(gcn::Graphics *graphics)
if (!userPalette || !player_node || !viewport)
return;
- Graphics *graph = static_cast<Graphics*>(graphics);
+ Graphics *const graph = static_cast<Graphics*>(graphics);
const gcn::Rectangle a = getChildrenArea();
@@ -256,7 +256,7 @@ void Minimap::draw(gcn::Graphics *graphics)
if (!(*it) || (*it)->getType() == ActorSprite::FLOOR_ITEM)
continue;
- const Being *being = static_cast<Being*>(*it);
+ const Being *const being = static_cast<const Being *const>(*it);
if (!being)
continue;
@@ -318,11 +318,12 @@ void Minimap::draw(gcn::Graphics *graphics)
if (player_node->isInParty())
{
- Party *party = player_node->getParty();
+ Party *const party = player_node->getParty();
if (party)
{
- PartyMember *m = party->getMember(player_node->getName());
- Party::MemberList *members = party->getMembers();
+ const PartyMember *const m = party->getMember(
+ player_node->getName());
+ Party::MemberList *const members = party->getMembers();
if (m && members)
{
const std::string curMap = m->getMap();
@@ -331,7 +332,7 @@ void Minimap::draw(gcn::Graphics *graphics)
it_end = members->end();
while (it != it_end)
{
- PartyMember *member = *it;
+ const PartyMember *const member = *it;
if (member && member->getMap() == curMap
&& member->getOnline() && member != m)
{