From 7ec2e0fbd6c53faa52ca0e6f2e8e172d3556c81d Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 17 Feb 2018 22:08:18 +0100 Subject: Fix all warnings (errors with -Werror) --- src/main/cpp/RangedWeapon.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main/cpp/RangedWeapon.cpp') diff --git a/src/main/cpp/RangedWeapon.cpp b/src/main/cpp/RangedWeapon.cpp index 21feae4..6f24666 100644 --- a/src/main/cpp/RangedWeapon.cpp +++ b/src/main/cpp/RangedWeapon.cpp @@ -14,20 +14,25 @@ bool RangedWeapon::use(Actor &user, Actor &actor) actor.damage(user.attack() + _damage - actor.defence()); _charged = false; } + + return true; } bool RangedWeapon::reload(Actor &actor) { //TODO add bullet type std::list inventory = actor.inventory(); - for (Item* item : inventory) { + for (Item *item : inventory) { if (item->type == Item::Type::BULLET) { //TODO get the bullet - //Bullet* bullet = dynamic_cast (item); + // Bullet *bullet = dynamic_cast (item); break; } } + // TODO remove + return true; + /* if (bullet->decreaseAmount(1)) { _charged = true; -- cgit v1.2.1