summaryrefslogtreecommitdiff
path: root/src/beingequipbackend.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-22 19:35:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-22 19:35:22 +0300
commit34bd6e0b8e0fb74cc416550a52e6406c47fefea6 (patch)
treef2e36f2ae2b721de22be4e1b18cf1dd09ba03741 /src/beingequipbackend.cpp
parent1ee6d71c1d771ab8a990ef427a59f54132910ac7 (diff)
downloadplus-34bd6e0b8e0fb74cc416550a52e6406c47fefea6.tar.gz
plus-34bd6e0b8e0fb74cc416550a52e6406c47fefea6.tar.bz2
plus-34bd6e0b8e0fb74cc416550a52e6406c47fefea6.tar.xz
plus-34bd6e0b8e0fb74cc416550a52e6406c47fefea6.zip
Add some missing consts.
Diffstat (limited to 'src/beingequipbackend.cpp')
-rw-r--r--src/beingequipbackend.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/beingequipbackend.cpp b/src/beingequipbackend.cpp
index 22459cc24..75f135409 100644
--- a/src/beingequipbackend.cpp
+++ b/src/beingequipbackend.cpp
@@ -41,20 +41,21 @@ BeingEquipBackend::BeingEquipBackend(Being *const being)
{
const int idx = inventoryHandler->
convertFromServerSlot(CAST_S32(f));
- const int id = being->mSlots[f].spriteId;
+ const BeingSlot &slot = being->mSlots[f];
+ const int id = slot.spriteId;
if (id > 0 && idx >= 0 && idx < EQUIPMENT_SIZE)
{
Item *const item = new Item(id,
ItemType::Unknown,
1,
0,
- being->mSlots[f].colorId,
+ slot.colorId,
Identified_true,
Damaged_false,
Favorite_false,
Equipm_true,
Equipped_true);
- const CardsList &cards = being->mSlots[f].cardsId;
+ const CardsList &cards = slot.cardsId;
if (!cards.isEmpty())
item->setCards(&cards.cards[0], maxCards);
mEquipment[idx] = item;