summaryrefslogtreecommitdiff
path: root/src/beingequipbackend.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-18 19:02:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-18 19:02:45 +0300
commitf1812857720449697c9106a7a3776b7202258cb3 (patch)
treeeb100f3d713c3faeebd057c6c3d572e17295d345 /src/beingequipbackend.cpp
parent33b6e130de855dd3a81e739168a668d898f78e9e (diff)
downloadmanaverse-f1812857720449697c9106a7a3776b7202258cb3.tar.gz
manaverse-f1812857720449697c9106a7a3776b7202258cb3.tar.bz2
manaverse-f1812857720449697c9106a7a3776b7202258cb3.tar.xz
manaverse-f1812857720449697c9106a7a3776b7202258cb3.zip
Fix code style in beingequipbackend and add some consts to it.
Diffstat (limited to 'src/beingequipbackend.cpp')
-rw-r--r--src/beingequipbackend.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/beingequipbackend.cpp b/src/beingequipbackend.cpp
index 051afcfe2..e732e72c4 100644
--- a/src/beingequipbackend.cpp
+++ b/src/beingequipbackend.cpp
@@ -44,7 +44,10 @@ BeingEquipBackend::BeingEquipBackend(Being *const being)
const int id = being->mSpriteIDs[f];
if (id > 0 && idx >= 0 && idx < EQUIPMENT_SIZE)
{
- mEquipment[idx] = new Item(id, 0, 1, 0,
+ mEquipment[idx] = new Item(id,
+ 0,
+ 1,
+ 0,
being->mSpriteColorsIds[f],
Identified_true,
Damaged_false,
@@ -68,12 +71,13 @@ void BeingEquipBackend::clear()
delete2(mEquipment[i])
}
-void BeingEquipBackend::setEquipment(const int index, Item *const item)
+void BeingEquipBackend::setEquipment(const int index,
+ const Item *const item)
{
mEquipment[index] = item;
}
-Item *BeingEquipBackend::getEquipment(const int index) const
+const Item *BeingEquipBackend::getEquipment(const int index) const
{
if (index < 0 || index >= EQUIPMENT_SIZE)
return nullptr;