summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-18 18:56:46 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-18 19:07:49 +0300
commite85c6227064c905945a4d49a5e11a0078243a1ac (patch)
tree01cab11bccef2c2b47f78d1f32884f6e199db2bd /src/being/being.cpp
parent3c7d4f339c20bc665efa6f6666171f0ca610203b (diff)
downloadmanaplus-e85c6227064c905945a4d49a5e11a0078243a1ac.tar.gz
manaplus-e85c6227064c905945a4d49a5e11a0078243a1ac.tar.bz2
manaplus-e85c6227064c905945a4d49a5e11a0078243a1ac.tar.xz
manaplus-e85c6227064c905945a4d49a5e11a0078243a1ac.zip
add missing const in being classes.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 2e7f6d67b..3f40398a0 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -648,7 +648,8 @@ int Being::getHitEffect(const Being *const attacker,
{
if (attacker)
{
- const ItemInfo *attackerWeapon = attacker->getEquippedWeapon();
+ const ItemInfo *const attackerWeapon
+ = attacker->getEquippedWeapon();
if (attackerWeapon && attacker->getType() == PLAYER)
{
if (type == MISS)
@@ -663,7 +664,7 @@ int Being::getHitEffect(const Being *const attacker,
const BeingInfo *const info = attacker->getInfo();
if (info)
{
- const Attack *atk = info->getAttack(attackId);
+ const Attack *const atk = info->getAttack(attackId);
if (atk)
{
if (type == MISS)
@@ -768,7 +769,7 @@ void Being::handleSkill(Being *const victim, const int damage,
if (this != player_node)
setAction(Being::ATTACK, 1);
- SkillInfo *const skill = skillDialog->getSkill(skillId);
+ const SkillInfo *const skill = skillDialog->getSkill(skillId);
const SkillData *const data = skill
? skill->getData1(skillLevel) : nullptr;
if (data)
@@ -1584,7 +1585,7 @@ void Being::logic()
}
void Being::drawEmotion(Graphics *const graphics, const int offsetX,
- const int offsetY)
+ const int offsetY) const
{
const int px = getPixelX() - offsetX - 16;
const int py = getPixelY() - offsetY - 64 - 32;
@@ -3028,7 +3029,7 @@ void Being::updatePets()
}
void Being::playSfx(const SoundInfo &sound, Being *const being,
- const bool main, const int x, const int y)
+ const bool main, const int x, const int y) const
{
if (being)
{