Reduced compilation time and binary size by uninlining some destructors.

This commit is contained in:
Guillaume Melquiond 2010-05-30 17:02:22 +00:00
parent d001bc69d4
commit 99b0808dd0
10 changed files with 30 additions and 2 deletions

View File

@ -60,6 +60,9 @@ config_writer::config_writer(
}
}
config_writer::~config_writer()
{
}
void config_writer::write(const config &cfg)
{

View File

@ -42,6 +42,8 @@ class config_writer
{
public:
config_writer(std::ostream &out, bool compress, int level = -1);
/** Default implementation, but defined out-of-line for efficiency reasons. */
~config_writer();
void write(const config &cfg);

View File

@ -29,6 +29,10 @@
static lg::log_domain log_engine("engine");
#define ERR_NG LOG_STREAM(err, log_engine)
terrain_filter::~terrain_filter()
{
}
#ifdef _MSC_VER
// This is a workaround for a VC bug; this constructor is never called
// and so we don't care about the warnings this quick fix generates

View File

@ -38,7 +38,8 @@ public:
terrain_filter(const vconfig& cfg,
const unit_map& units, const bool flat_tod=false, const size_t max_loop=MAX_MAP_AREA);
terrain_filter(const vconfig& cfg, const terrain_filter& original);
~terrain_filter() {};
/** Default implementation, but defined out-of-line for efficiency reasons. */
~terrain_filter();
terrain_filter(const terrain_filter &other);
terrain_filter& operator=(const terrain_filter &other);

View File

@ -70,6 +70,10 @@ attack_type::attack_type(const config& cfg) :
}
}
attack_type::~attack_type()
{
}
std::string attack_type::accuracy_parry_description() const
{
if(accuracy_ == 0 && parry_ == 0) {

View File

@ -38,6 +38,8 @@ class attack_type
public:
attack_type(const config& cfg);
/** Default implementation, but defined out-of-line for efficiency reasons. */
~attack_type();
const t_string& name() const { return description_; }
const std::string& id() const { return id_; }
const std::string& type() const { return type_; }

View File

@ -97,6 +97,10 @@ button::button(CVideo& video, const std::string& label, button::TYPE type,
}
}
button::~button()
{
}
void button::calculate_size()
{
if (type_ == TYPE_IMAGE){

View File

@ -39,7 +39,8 @@ public:
std::string button_image="", SPACE_CONSUMPTION spacing=DEFAULT_SPACE,
const bool auto_join=true);
virtual ~button() {}
/** Default implementation, but defined out-of-line for efficiency reasons. */
virtual ~button();
void set_check(bool check);
void set_active(bool active);
bool checked() const;

View File

@ -203,6 +203,10 @@ menu::menu(CVideo& video, const std::vector<std::string>& items,
fill_items(items, true);
}
menu::~menu()
{
}
void menu::fill_items(const std::vector<std::string>& items, bool strip_spaces)
{
for(std::vector<std::string>::const_iterator itor = items.begin();

View File

@ -162,6 +162,9 @@ public:
bool click_selects=false, int max_height=-1, int max_width=-1,
const sorter* sorter_obj=NULL, style *menu_style=NULL, const bool auto_join=true);
/** Default implementation, but defined out-of-line for efficiency reasons. */
~menu();
int selection() const;
void move_selection(size_t id);