From 0567180a51b0d9483dae9336c6e31a25a424050e Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 26 Apr 2006 10:15:34 +0000 Subject: [PATCH] fix exception getting thrown although argument was correct SVN-Revision: 3439 --- src/object/player.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/object/player.cpp b/src/object/player.cpp index c17f0b824..59b7d5760 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -543,19 +543,19 @@ Player::add_coins(int count) void Player::add_bonus(const std::string& bonustype) { - if(bonustype == "grow") + if(bonustype == "grow") { add_bonus(GROWUP_BONUS); - else if(bonustype == "fireflower") + } else if(bonustype == "fireflower") { add_bonus(FIRE_BONUS); - else if(bonustype == "iceflower") + } else if(bonustype == "iceflower") { add_bonus(ICE_BONUS); - else if(bonustype == "none") + } else if(bonustype == "none") { add_bonus(NO_BONUS); - - - std::ostringstream msg; - msg << "Unknown bonus type " << bonustype; - throw std::runtime_error(msg.str()); + } else { + std::ostringstream msg; + msg << "Unknown bonus type " << bonustype; + throw std::runtime_error(msg.str()); + } } void -- 2.11.0