From ab596ef3f4215f792feaa9ca1dfe5acb74c67328 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 26 Aug 2012 02:48:32 +0300 Subject: Add const to some classes. --- src/flooritem.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/flooritem.cpp') diff --git a/src/flooritem.cpp b/src/flooritem.cpp index f612713da..7826f7855 100644 --- a/src/flooritem.cpp +++ b/src/flooritem.cpp @@ -34,8 +34,10 @@ #include "debug.h" -FloorItem::FloorItem(int id, int itemId, int x, int y, Map *map, int amount, - unsigned char color, int subX, int subY): +FloorItem::FloorItem(const int id, const int itemId, const int x, const int y, + Map *const map, const int amount, + const unsigned char color, + int subX, int subY): ActorSprite(id), mItemId(itemId), mX(x), @@ -52,7 +54,7 @@ FloorItem::FloorItem(int id, int itemId, int x, int y, Map *map, int amount, const ItemInfo &info = ItemDB::get(itemId); if (map) { - int max = info.getMaxFloorOffset(); + const int max = info.getMaxFloorOffset(); if (subX > max) subX = max; else if (subX < -max) @@ -100,7 +102,7 @@ bool FloorItem::draw(Graphics *graphics, int offsetX, int offsetY) const if (mHighlight) { - int curTime = cur_time; + const int curTime = cur_time; font = gui->getFont(); if (mDropTime < curTime) { -- cgit v1.2.3-70-g09d2