fixed some warnings

This commit is contained in:
David Philippi 2006-06-10 16:20:25 +00:00
parent c1c07b7059
commit dbbc5f2765
8 changed files with 15 additions and 13 deletions

View file

@ -1813,7 +1813,7 @@ void ai::move_leader_to_keep(const move_map& enemy_dstsrc)
}
}
void ai::move_leader_after_recruit(const move_map& srcdst, const move_map& dstsrc, const move_map& enemy_dstsrc)
void ai::move_leader_after_recruit(const move_map& /*srcdst*/, const move_map& /*dstsrc*/, const move_map& enemy_dstsrc)
{
LOG_AI << "moving leader after recruit...\n";

View file

@ -796,6 +796,7 @@ SDL_Rect line_size(const std::string& line, int font_size, int style)
res.w = s.width();
res.h = s.height();
res.x = res.y = 0;
if(line.size() < max_cache_size) {
cache.insert(std::pair<std::string,SDL_Rect>(line,res));

View file

@ -104,7 +104,7 @@ void gamebrowser::draw_contents()
}
}
void gamebrowser::draw_row(const size_t index, const SDL_Rect& item_rect, ROW_TYPE type) {
void gamebrowser::draw_row(const size_t index, const SDL_Rect& item_rect, ROW_TYPE /*type*/) {
const game_item& game = games_[index];
int xpos = item_rect.x + margin_;
int ypos = item_rect.y + margin_;

View file

@ -1097,6 +1097,7 @@ SDL_Color inverse(const SDL_Color& colour) {
inverse.r = 255 - colour.r;
inverse.g = 255 - colour.g;
inverse.b = 255 - colour.b;
inverse.unused = 0;
return inverse;
}

View file

@ -89,7 +89,7 @@ preprocessor_streambuf::preprocessor_streambuf(preproc_map *def)
}
preprocessor_streambuf::preprocessor_streambuf(preprocessor_streambuf const &t)
: current_(NULL), defines_(t.defines_),
: std::streambuf(), current_(NULL), defines_(t.defines_),
textdomain_(PACKAGE), depth_(t.depth_), quoted_(t.quoted_)
{
}

View file

@ -1320,7 +1320,7 @@ void unit::set_extra_anim(const display &disp,const gamemap::location& loc, std:
anim_->update_current_frame();
}
const unit_animation & unit::set_attacking(const display &disp,const gamemap::location& loc,bool hit,const attack_type& type)
const unit_animation & unit::set_attacking(const display &disp,const gamemap::location& /*loc*/,bool hit,const attack_type& type)
{
state_ = STATE_ATTACKING;
draw_bars_ = false;
@ -1348,7 +1348,7 @@ void unit::set_leading(const display &disp,const gamemap::location& loc)
frame_begin_time = anim_->get_first_frame_time() -1;
anim_->update_current_frame();
}
void unit::set_leveling_in(const display &disp,const gamemap::location& loc)
void unit::set_leveling_in(const display &disp,const gamemap::location& /*loc*/)
{
state_ = STATE_LEVELIN;
draw_bars_ = false;
@ -1372,7 +1372,7 @@ void unit::set_leveling_in(const display &disp,const gamemap::location& loc)
frame_begin_time = anim_->get_first_frame_time() -1;
anim_->update_current_frame();
}
void unit::set_leveling_out(const display &disp,const gamemap::location& loc)
void unit::set_leveling_out(const display &disp,const gamemap::location& /*loc*/)
{
state_ = STATE_LEVELOUT;
draw_bars_ = false;
@ -1396,7 +1396,7 @@ void unit::set_leveling_out(const display &disp,const gamemap::location& loc)
frame_begin_time = anim_->get_first_frame_time() -1;
anim_->update_current_frame();
}
void unit::set_recruited(const display &disp,const gamemap::location& loc)
void unit::set_recruited(const display &disp,const gamemap::location& /*loc*/)
{
state_ = STATE_RECRUITED;
draw_bars_ = false;
@ -1417,7 +1417,7 @@ void unit::set_recruited(const display &disp,const gamemap::location& loc)
frame_begin_time = anim_->get_first_frame_time() -1;
anim_->update_current_frame();
}
void unit::set_healed(const display &disp,const gamemap::location& loc, int healing)
void unit::set_healed(const display &disp,const gamemap::location& /*loc*/, int healing)
{
state_ = STATE_HEALED;
draw_bars_ = true;
@ -1442,7 +1442,7 @@ void unit::set_healed(const display &disp,const gamemap::location& loc, int heal
frame_begin_time = anim_->get_first_frame_time() -1;
anim_->update_current_frame();
}
void unit::set_poisoned(const display &disp,const gamemap::location& loc, int damage)
void unit::set_poisoned(const display &disp,const gamemap::location& /*loc*/, int damage)
{
state_ = STATE_POISONED;
draw_bars_ = true;
@ -1468,7 +1468,7 @@ void unit::set_poisoned(const display &disp,const gamemap::location& loc, int da
anim_->update_current_frame();
}
void unit::set_teleporting(const display &disp,const gamemap::location& loc)
void unit::set_teleporting(const display &disp,const gamemap::location& /*loc*/)
{
state_ = STATE_TELEPORT;
draw_bars_ = false;
@ -1503,7 +1503,7 @@ void unit::set_dying(const display &disp,const gamemap::location& loc,const atta
frame_begin_time = anim_->get_first_frame_time() -1;
anim_->update_current_frame();
}
void unit::set_healing(const display &disp,const gamemap::location& loc)
void unit::set_healing(const display &disp,const gamemap::location& /*loc*/)
{
state_ = STATE_HEALING;
draw_bars_ = true;

View file

@ -676,7 +676,7 @@ SDL_Rect menu::style::item_size(const std::string& item) const {
return res;
}
void menu::style::draw_row_bg(menu& menu_ref, const size_t row_index, const SDL_Rect& rect, ROW_TYPE type)
void menu::style::draw_row_bg(menu& menu_ref, const size_t /*row_index*/, const SDL_Rect& rect, ROW_TYPE type)
{
menu_ref.bg_restore(rect);

View file

@ -55,7 +55,7 @@ menu::style::~style()
menu::imgsel_style::imgsel_style(const std::string &img_base, bool has_bg,
int normal_rgb, int selected_rgb, int heading_rgb,
double normal_alpha, double selected_alpha, double heading_alpha)
: img_base_(img_base), initialized_(false), load_failed_(false), has_background_(has_bg),
: img_base_(img_base), has_background_(has_bg), initialized_(false), load_failed_(false),
normal_rgb2_(normal_rgb), selected_rgb2_(selected_rgb), heading_rgb2_(heading_rgb),
normal_alpha2_(normal_alpha), selected_alpha2_(selected_alpha), heading_alpha2_(heading_alpha)
{}