[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src ai.cpp config.cpp map_label.cpp mul...
From: |
Isaac Clerencia |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src ai.cpp config.cpp map_label.cpp mul... |
Date: |
Sun, 29 Aug 2004 07:17:06 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Isaac Clerencia <address@hidden> 04/08/29 11:12:20
Modified files:
src : ai.cpp config.cpp map_label.cpp
multiplayer_client.cpp multiplayer_lobby.hpp
team.cpp titlescreen.cpp unit.cpp
src/widgets : menu.cpp
Log message:
Applied patch from Silene which deals with several warnings (3318)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai.cpp.diff?tr1=1.112&tr2=1.113&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/config.cpp.diff?tr1=1.102&tr2=1.103&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/map_label.cpp.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_client.cpp.diff?tr1=1.61&tr2=1.62&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_lobby.hpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/team.cpp.diff?tr1=1.69&tr2=1.70&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/titlescreen.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.92&tr2=1.93&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/menu.cpp.diff?tr1=1.58&tr2=1.59&r1=text&r2=text
Patches:
Index: wesnoth/src/ai.cpp
diff -u wesnoth/src/ai.cpp:1.112 wesnoth/src/ai.cpp:1.113
--- wesnoth/src/ai.cpp:1.112 Wed Aug 25 02:59:50 2004
+++ wesnoth/src/ai.cpp Sun Aug 29 11:12:20 2004
@@ -1,4 +1,4 @@
-/* $Id: ai.cpp,v 1.112 2004/08/25 02:59:50 Sirp Exp $ */
+/* $Id: ai.cpp,v 1.113 2004/08/29 11:12:20 isaaccp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -228,7 +228,6 @@
const std::map<location,paths>::iterator p_it =
possible_moves.find(from);
- bool ambushed = false;
if(p_it != possible_moves.end()) {
paths& p = p_it->second;
std::map<location,paths::route>::iterator rt = p.routes.begin();
@@ -316,7 +315,6 @@
std::cerr << "found leader moves..\n";
- bool can_make_it = false;
int move_left = 0;
//see if the unit can make it to 'via', and if
it can, how much movement it will have
@@ -607,8 +605,6 @@
remove_unit_from_moves(leader->first,srcdst,dstsrc);
}
- int ticks = SDL_GetTicks();
-
std::vector<attack_analysis> analysis;
AI_DIAGNOSTIC("combat phase");
@@ -738,9 +734,6 @@
const unit_map::const_iterator tgt = units_.find(target_loc);
- const bool defender_human = (tgt != units_.end()) ?
- teams_[tgt->second.side()-1].is_human() : false;
-
const location arrived_at = move_unit(from,to,possible_moves);
if(arrived_at != to) {
std::cerr << "unit moving to attack has ended up
unexpectedly at " << (arrived_at.x+1) << "," << (arrived_at.y+1) << " when
moving to "
Index: wesnoth/src/config.cpp
diff -u wesnoth/src/config.cpp:1.102 wesnoth/src/config.cpp:1.103
--- wesnoth/src/config.cpp:1.102 Mon Aug 23 06:40:59 2004
+++ wesnoth/src/config.cpp Sun Aug 29 11:12:20 2004
@@ -1,4 +1,4 @@
-/* $Id: config.cpp,v 1.102 2004/08/23 06:40:59 gakusho Exp $ */
+/* $Id: config.cpp,v 1.103 2004/08/29 11:12:20 isaaccp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -742,8 +742,7 @@
//all the last values get concatenated
onto the last name
if(vars.empty() == false) {
for(size_t n = 0; n !=
maximum<size_t>(vars.size(),values.size()); ++n) {
- const std::string&
varname = n < vars.size() ? vars[n] : vars.back();
- std::string value = "";
+ std::string value;
if(n < values.size()) {
value =
values[n];
} else
if(values.empty() == false) {
Index: wesnoth/src/map_label.cpp
diff -u wesnoth/src/map_label.cpp:1.10 wesnoth/src/map_label.cpp:1.11
--- wesnoth/src/map_label.cpp:1.10 Tue Aug 24 19:49:35 2004
+++ wesnoth/src/map_label.cpp Sun Aug 29 11:12:20 2004
@@ -33,7 +33,6 @@
const config::child_list& items = cfg.get_children("label");
for(config::child_list::const_iterator i = items.begin(); i !=
items.end(); ++i) {
const gamemap::location loc(**i);
- const std::string& id = (**i)["id"];
const std::string& text = (**i)["text"];
set_label(loc,text);
}
Index: wesnoth/src/multiplayer_client.cpp
diff -u wesnoth/src/multiplayer_client.cpp:1.61
wesnoth/src/multiplayer_client.cpp:1.62
--- wesnoth/src/multiplayer_client.cpp:1.61 Wed Aug 25 02:59:51 2004
+++ wesnoth/src/multiplayer_client.cpp Sun Aug 29 11:12:20 2004
@@ -64,7 +64,9 @@
class wait_for_start : public lobby::dialog
{
public:
- wait_for_start(display& disp, config& cfg, int team_num, const
std::string& team_name) : got_side(false), team(team_num), name(team_name),
status(START_GAME), disp_(disp), cancel_button_(NULL), sides_(cfg), menu_(NULL)
+ wait_for_start(display& disp, config& cfg, int team_num, const
std::string& team_name)
+ : got_side(false), team(team_num), name(team_name),
status(START_GAME), disp_(disp),
+ sides_(cfg), cancel_button_(NULL), menu_(NULL)
{
SDL_Rect empty_rect = {0,0,0,0};
area_ = empty_rect;
Index: wesnoth/src/multiplayer_lobby.hpp
diff -u wesnoth/src/multiplayer_lobby.hpp:1.6
wesnoth/src/multiplayer_lobby.hpp:1.7
--- wesnoth/src/multiplayer_lobby.hpp:1.6 Tue May 11 18:32:37 2004
+++ wesnoth/src/multiplayer_lobby.hpp Sun Aug 29 11:12:20 2004
@@ -19,6 +19,7 @@
virtual RESULT process() = 0;
virtual bool manages_network() const { return false; }
virtual bool get_network_data(config& out) { return false; }
+ virtual ~dialog() {}
};
///function which controls the lobby, and will result in the player creating
Index: wesnoth/src/team.cpp
diff -u wesnoth/src/team.cpp:1.69 wesnoth/src/team.cpp:1.70
--- wesnoth/src/team.cpp:1.69 Thu Aug 26 15:50:01 2004
+++ wesnoth/src/team.cpp Sun Aug 29 11:12:20 2004
@@ -1,4 +1,4 @@
-/* $Id: team.cpp,v 1.69 2004/08/26 15:50:01 isaaccp Exp $ */
+/* $Id: team.cpp,v 1.70 2004/08/29 11:12:20 isaaccp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -65,7 +65,6 @@
team_name = cfg["team_name"];
if(team_name.empty())
team_name = cfg["side"];
- const std::string& side_colour = cfg["colour"];
colour = lexical_cast_default<int>(cfg["colour"],-1);
if(colour == -1)
colour = lexical_cast_default<int>(cfg["side"],-1);
Index: wesnoth/src/titlescreen.cpp
diff -u wesnoth/src/titlescreen.cpp:1.15 wesnoth/src/titlescreen.cpp:1.16
--- wesnoth/src/titlescreen.cpp:1.15 Wed Aug 25 02:59:51 2004
+++ wesnoth/src/titlescreen.cpp Sun Aug 29 11:12:20 2004
@@ -227,9 +227,6 @@
std::cerr << "entering interactive loop...\n";
for(;;) {
- int mousex, mousey;
- const int mouse_flags = SDL_GetMouseState(&mousex,&mousey);
-
for(size_t b = 0; b != buttons.size(); ++b) {
if(buttons[b].pressed()) {
return TITLE_RESULT(b);
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.92 wesnoth/src/unit.cpp:1.93
--- wesnoth/src/unit.cpp:1.92 Wed Aug 25 02:59:51 2004
+++ wesnoth/src/unit.cpp Sun Aug 29 11:12:20 2004
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.92 2004/08/25 02:59:51 Sirp Exp $ */
+/* $Id: unit.cpp,v 1.93 2004/08/29 11:12:20 isaaccp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -882,7 +882,7 @@
state_ = newval ? (range == attack_type::LONG_RANGE ?
STATE_DEFENDING_LONG :
STATE_DEFENDING_SHORT): STATE_NORMAL;
// attackingMilliseconds_ = ms;
- const unit_animation* const anim =
type_->defend_animation(getsHit_,range);
+ type_->defend_animation(getsHit_,range);
getsHit_ = hits;
}
Index: wesnoth/src/widgets/menu.cpp
diff -u wesnoth/src/widgets/menu.cpp:1.58 wesnoth/src/widgets/menu.cpp:1.59
--- wesnoth/src/widgets/menu.cpp:1.58 Mon Aug 23 06:41:00 2004
+++ wesnoth/src/widgets/menu.cpp Sun Aug 29 11:12:20 2004
@@ -356,6 +356,8 @@
case SDLK_PAGEDOWN:
move_selection_down(max_items_onscreen());
break;
+ default:
+ break;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src ai.cpp config.cpp map_label.cpp mul...,
Isaac Clerencia <=