Author: mordante
Date: Tue May 12 23:05:45 2009
New Revision: 35612
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35612&view=rev
Log:
Strip trailing whitespace.
Modified:
trunk/src/ai/ai_actions.cpp
trunk/src/ai/testing.hpp
trunk/src/astarsearch.cpp
trunk/src/gui/dialogs/dialog.hpp
trunk/src/gui/widgets/grid_private.hpp
trunk/src/gui/widgets/window.hpp
trunk/src/gui/widgets/window_private.hpp
trunk/src/help.cpp
trunk/src/lexical_cast.hpp
trunk/src/pathfind.cpp
trunk/src/savegame.cpp
trunk/src/savegame.hpp
trunk/src/unit_animation.cpp
Modified: trunk/src/ai/ai_actions.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/ai_actions.cpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/ai/ai_actions.cpp (original)
+++ trunk/src/ai/ai_actions.cpp Tue May 12 23:05:45 2009
@@ -218,7 +218,7 @@
}
-bool ai_move_result::test_unit(unit_map::const_iterator& un, const unit_map&
units, const std::vector<team>& /*teams*/, bool /*update_knowledge*/)
+bool ai_move_result::test_unit(unit_map::const_iterator& un, const unit_map&
units, const std::vector<team>& /*teams*/, bool /*update_knowledge*/)
{
un = units.find(from_);
if (un==units.end()){
@@ -574,7 +574,7 @@
}
-bool ai_stopunit_result::test_unit(unit_map::const_iterator& un, const
unit_map& units, bool /*update_knowledge*/)
+bool ai_stopunit_result::test_unit(unit_map::const_iterator& un, const
unit_map& units, bool /*update_knowledge*/)
{
un = units.find(unit_location_);
if (un==units.end()){
Modified: trunk/src/ai/testing.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/testing.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/ai/testing.hpp (original)
+++ trunk/src/ai/testing.hpp Tue May 12 23:05:45 2009
@@ -42,7 +42,7 @@
*/
static void log_draw();
-
+
/*
* Log in case of victory
* teams vector of winner teams
Modified: trunk/src/astarsearch.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/astarsearch.cpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/astarsearch.cpp (original)
+++ trunk/src/astarsearch.cpp Tue May 12 23:05:45 2009
@@ -87,7 +87,7 @@
class comp {
const std::vector<node>& nodes_;
-
+
public:
comp(const std::vector<node>& n) : nodes_(n) { }
bool operator()(int a, int b) {
@@ -97,13 +97,13 @@
class indexer {
size_t h_, w_;
-
+
public:
indexer(size_t a, size_t b) : h_(a), w_(b) { }
size_t operator()(const map_location& loc) {
return loc.y * h_ + loc.x;
}
-};
+};
}
@@ -116,8 +116,8 @@
assert(calc != NULL);
assert(stop_at <= calc->getNoPathValue());
//---------------------------------------------------
-
-
+
+
DBG_PF << "A* search: " << src << " -> " << dst << '\n';
if (calc->cost(src,dst, 0) >= stop_at) {
@@ -128,8 +128,8 @@
}
const std::set<map_location>& teleports = teleports_ptr ?
*teleports_ptr : std::set<map_location>();
-
-
+
+
std::vector<map_location> locs(6 + teleports.size());
std::copy(teleports.begin(), teleports.end(), locs.begin() + 6);
@@ -138,29 +138,29 @@
static std::vector<node> nodes;
nodes.resize(width * height);
-
+
indexer index(width, height);
comp node_comp(nodes);
-
+
nodes[index(dst)].g = stop_at;
nodes[index(src)] = node(0, src, map_location::null_location, dst,
true);
-
+
std::vector<int> pq;
pq.push_back(index(src));
while (!pq.empty()) {
node& n = nodes[pq.front()];
n.in = search_counter;
- std::pop_heap(pq.begin(), pq.end(), node_comp);
+ std::pop_heap(pq.begin(), pq.end(), node_comp);
pq.pop_back();
-
- if (n.t >= nodes[index(dst)].g) break;
-
+
+ if (n.t >= nodes[index(dst)].g) break;
+
get_adjacent_tiles(n.curr, &locs[0]);
-
+
for (int i = teleports.count(n.curr) ? locs.size() : 6; i-- >
0;) {
if (!locs[i].valid(width, height)) continue;
-
+
node& next = nodes[index(locs[i])];
double thresh = (next.in - search_counter <= 1u) ?
next.g : stop_at;
@@ -171,8 +171,8 @@
bool in_list = next.in == search_counter + 1;
- next = node(cost, locs[i], n.curr, dst, true);
-
+ next = node(cost, locs[i], n.curr, dst, true);
+
if (in_list) {
std::push_heap(pq.begin(),
std::find(pq.begin(), pq.end(), index(locs[i])) + 1, node_comp);
} else {
@@ -190,12 +190,12 @@
route.steps.push_back(curr.curr);
}
route.steps.push_back(src);
- std::reverse(route.steps.begin(), route.steps.end());
- } else {
+ std::reverse(route.steps.begin(), route.steps.end());
+ } else {
LOG_PF << "aborted a* search " << "\n";
route.move_cost = (int)calc->getNoPathValue();
}
-
+
return route;
}
Modified: trunk/src/gui/dialogs/dialog.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/dialog.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/gui/dialogs/dialog.hpp (original)
+++ trunk/src/gui/dialogs/dialog.hpp Tue May 12 23:05:45 2009
@@ -43,7 +43,7 @@
virtual ~tdialog();
- /**
+ /**
* Shows the window.
*
* @param video The video which contains the surface to
draw
Modified: trunk/src/gui/widgets/grid_private.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/grid_private.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/gui/widgets/grid_private.hpp (original)
+++ trunk/src/gui/widgets/grid_private.hpp Tue May 12 23:05:45 2009
@@ -38,7 +38,7 @@
/**
* Helper struct to get the same constness for T and U.
- *
+ *
* @param T A type to determine the constness.
* @param U Non const type to set the constness off.
*/
@@ -58,15 +58,15 @@
};
/**
- * Helper to implement private functions without modifing the header.
- *
- * The class is a helper to avoid recompilation and only has static
- * functions.
+ * Helper to implement private functions without modifing the header.
+ *
+ * The class is a helper to avoid recompilation and only has static
+ * functions.
*/
struct tgrid_implementation
{
/**
- * Implementation for the wrappers for
+ * Implementation for the wrappers for
* [const] twidget* tgrid::find_widget(const tpoint&, const bool)
[const].
*
* @param W twidget or const twidget.
@@ -94,7 +94,7 @@
}
/**
- * Implementation for the wrappers for
+ * Implementation for the wrappers for
* [const] twidget* tgrid::find_widget(const std::string&,
* const bool) [const].
*
Modified: trunk/src/gui/widgets/window.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.hpp (original)
+++ trunk/src/gui/widgets/window.hpp Tue May 12 23:05:45 2009
@@ -119,7 +119,7 @@
* Dialog is closed with the cancel
* button.
*/
- AUTO_CLOSE = -3 /**<
+ AUTO_CLOSE = -3 /**<
* The dialog is closed
automatically
* since it's timeout has been
* triggered.
Modified: trunk/src/gui/widgets/window_private.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window_private.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/gui/widgets/window_private.hpp (original)
+++ trunk/src/gui/widgets/window_private.hpp Tue May 12 23:05:45 2009
@@ -30,10 +30,10 @@
namespace gui2 {
/**
- * Helper to implement private functions without modifing the header.
- *
- * The class is a helper to avoid recompilation and only has static
- * functions.
+ * Helper to implement private functions without modifing the header.
+ *
+ * The class is a helper to avoid recompilation and only has static
+ * functions.
*/
struct twindow_implementation
{
Modified: trunk/src/help.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Tue May 12 23:05:45 2009
@@ -1378,7 +1378,7 @@
}
ss << "\n"; //added even if empty, to avoid shifting
- reverse = !reverse; //switch direction
+ reverse = !reverse; //switch direction
} while(reverse != first_reverse_value); // don't restart
// Print the race of the unit, cross-reference it to the
Modified: trunk/src/lexical_cast.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lexical_cast.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/lexical_cast.hpp (original)
+++ trunk/src/lexical_cast.hpp Tue May 12 23:05:45 2009
@@ -126,7 +126,7 @@
*
* @tparam To The type to convert to.
* @tparam From The type to convert from.
- *
+ *
* @param value The value to convert.
*
* @returns The converted value.
Modified: trunk/src/pathfind.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/pathfind.cpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/pathfind.cpp (original)
+++ trunk/src/pathfind.cpp Tue May 12 23:05:45 2009
@@ -158,9 +158,9 @@
{
const team& current_team = teams[u.side() - 1];
const std::set<map_location>& teleports = allow_teleport ?
current_team.villages() : std::set<map_location>();
-
+
const int total_movement = u.total_movement();
-
+
std::vector<map_location> locs(6 + teleports.size());
std::copy(teleports.begin(), teleports.end(), locs.begin() + 6);
@@ -169,7 +169,7 @@
static std::vector<node> nodes;
nodes.resize(map.w() * map.h());
-
+
indexer index(map.w(), map.h());
comp node_comp(nodes);
@@ -178,17 +178,17 @@
nodes[index(loc)] = node(move_left, turns_left,
map_location::null_location, loc);
std::vector<int> pq;
pq.push_back(index(loc));
-
+
while (!pq.empty()) {
node& n = nodes[pq.front()];
std::pop_heap(pq.begin(), pq.end(), node_comp);
pq.pop_back();
n.in = search_counter;
-
+
get_adjacent_tiles(n.curr, &locs[0]);
for (int i = teleports.count(n.curr) ? locs.size() : 6; i-- >
0; ) {
if (!locs[i].valid(map.w(), map.h())) continue;
-
+
node& next = nodes[index(locs[i])];
bool next_visited = next.in - search_counter <= 1u;
@@ -198,15 +198,15 @@
if (next_visited && !(n < next)) continue;
const int move_cost = u.movement_cost(map[locs[i]]);
-
+
node t = node(n.movement_left, n.turns_left, n.curr,
locs[i]);
if (t.movement_left < move_cost) {
t.movement_left = total_movement;
t.turns_left--;
}
-
+
if (t.movement_left < move_cost || t.turns_left < 0)
continue;
-
+
t.movement_left -= move_cost;
if (next_visited && !(t < next)) continue;
@@ -216,8 +216,8 @@
find_visible_unit(units, locs[i], map,
teams, viewing_team, see_all);
if (unit_it != units.end() &&
current_team.is_enemy(unit_it->second.side()))
continue;
-
-
+
+
if (!force_ignore_zocs && t.movement_left > 0
&& enemy_zoc(map, units, teams,
locs[i], viewing_team, u.side(), see_all)
&&
!u.get_ability_bool("skirmisher", locs[i])) {
@@ -248,8 +248,8 @@
} else {
pq.push_back(index(locs[i]));
std::push_heap(pq.begin(), pq.end(), node_comp);
- }
- }
+ }
+ }
}
// Build the routes for every map_location that we reached.
Modified: trunk/src/savegame.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/savegame.cpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/savegame.cpp (original)
+++ trunk/src/savegame.cpp Tue May 12 23:05:45 2009
@@ -509,7 +509,7 @@
int res = gui2::twindow::OK;
bool exit = true;
- do{
+ do{
try{
res = show_save_dialog(video, message, dialog_type);
exit = true;
@@ -617,7 +617,7 @@
if (video != NULL && show_confirmation_)
gui2::show_message(*video, _("Saved"), _("The game has
been saved"));
-
+
return true;
} catch(game::save_game_failed&) {
if (video != NULL){
Modified: trunk/src/savegame.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/savegame.hpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/savegame.hpp (original)
+++ trunk/src/savegame.hpp Tue May 12 23:05:45 2009
@@ -36,8 +36,8 @@
time_t time_modified;
};
-/**
-Container for a couple of savefile manipulating methods.
+/**
+Container for a couple of savefile manipulating methods.
Note: You are not supposed to instantiate this class.
*/
class savegame_manager
@@ -65,8 +65,8 @@
savegame_manager() {}
};
-/**
-Container for methods dealing with the save_index file.
+/**
+Container for methods dealing with the save_index file.
Note: You are not supposed to instantiate this class.
*/
class save_index
@@ -142,7 +142,7 @@
//bool save_game(const std::string& filename);
/** Saves a game without user interaction, unless the file exists and
it should be asked
- to overwrite it. The return value denotes, if the save was
successful or not.
+ to overwrite it. The return value denotes, if the save was
successful or not.
This is used by automatically generated replays,
start-of-scenario saves and autosaves.
*/
bool save_game_automatic(CVideo& video, bool ask_for_overwrite = false,
const std::string& filename = "");
@@ -155,9 +155,9 @@
const std::string& filename() const { return filename_; }
protected:
- /**
- Save a game without any further user interaction. If you want
notifying messages
- or error messages to appear, you have to provide the gui
parameter.
+ /**
+ Save a game without any further user interaction. If you want
notifying messages
+ or error messages to appear, you have to provide the gui
parameter.
The return value denotes, if the save was successful or not.
*/
bool save_game(CVideo* video = NULL, const std::string& filename = "");
Modified: trunk/src/unit_animation.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=35612&r1=35611&r2=35612&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Tue May 12 23:05:45 2009
@@ -840,7 +840,7 @@
return true;
} else {
std::vector<map_location> intersection;
- set_intersection(overlaped_hex_.begin(),overlaped_hex_.end(),
+ set_intersection(overlaped_hex_.begin(),overlaped_hex_.end(),
disp->get_invalidated().begin(),disp->get_invalidated().end(),
std::back_inserter(intersection));
if(!intersection.empty()) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits