remove unused portrait function from unit

This function was entirely unused, and deleting it allows us to
remove the "portrait.hpp" include from the unit.hpp header. (!)
This commit is contained in:
Chris Beck 2014-06-14 16:38:34 -04:00
parent 15ab52d460
commit 85de1c2c55
2 changed files with 0 additions and 27 deletions

View file

@ -3086,20 +3086,6 @@ const std::string& unit::effect_image_mods() const{
return image_mods_;
}
const tportrait* unit::portrait(
const unsigned size, const tportrait::tside side) const
{
BOOST_FOREACH(const tportrait& portrait, type().portraits() ) {
if(portrait.size == size
&& (side == portrait.side || portrait.side == tportrait::BOTH)) {
return &portrait;
}
}
return NULL;
}
void unit::remove_attacks_ai()
{
if (attacks_left_ == max_attacks_) {

View file

@ -21,7 +21,6 @@
#include <boost/scoped_ptr.hpp>
#include "formula_callable.hpp"
#include "portrait.hpp"
#include "resources.hpp"
#include "unit_animation.hpp"
#include "unit_types.hpp"
@ -399,18 +398,6 @@ public:
const std::string& effect_image_mods() const;
std::string image_mods() const;
/**
* Gets the portrait for a unit.
*
* @param size The size of the portrait.
* @param side The side the portrait is shown on.
*
* @returns The portrait with the wanted size.
* @retval NULL The wanted portrait doesn't exist.
*/
const tportrait* portrait(
const unsigned size, const tportrait::tside side) const;
private:
void advance_to(const config &old_cfg, const unit_type &t,
bool use_traits);