Merge lp:~hjd/widelands/remove-unused-variables into lp:widelands

Proposed by Hans Joachim Desserud
Status: Merged
Merged at revision: 5844
Proposed branch: lp:~hjd/widelands/remove-unused-variables
Merge into: lp:widelands
Diff against target: 24 lines (+0/-3)
2 files modified
src/ai/defaultai.cc (+0/-2)
src/scripting/lua_game.cc (+0/-1)
To merge this branch: bzr merge lp:~hjd/widelands/remove-unused-variables
Reviewer Review Type Date Requested Status
Nicolai Hähnle Approve
Review via email: mp+50468@code.launchpad.net

Description of the change

Removed a few unused variables which were causing warnings at compilation-time.

To post a comment you must log in.
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

FWIW, here's the warnings:
/home/user/widelands/src/ai/defaultai.cc: In member function ‘bool DefaultAI::check_mines(int32_t)’:
/home/user/widelands/src/ai/defaultai.cc:1794: warning: unused variable ‘en_bo’
/home/user/widelands/src/scripting/lua_game.cc: In member function ‘int LuaGame::L_Player::add_objective(lua_State*)’:
/home/user/widelands/src/scripting/lua_game.cc:573: warning: unused variable ‘p’

The warning concerned bld appeared once I had removed en_bo, since it was the only place where it was used.

Revision history for this message
Nicolai Hähnle (nha) wrote :

Looks good to me.

review: Approve
Revision history for this message
Nicolai Hähnle (nha) wrote :

Thank you for doing such cleanup work, it is much appreciated. I've merged your branch now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ai/defaultai.cc'
2--- src/ai/defaultai.cc 2011-01-04 15:22:35 +0000
3+++ src/ai/defaultai.cc 2011-02-19 20:44:03 +0000
4@@ -1790,8 +1790,6 @@
5 container_iterate_const(std::set<Building_Index>, enhancements, x) {
6 // Only enhance buildings that are allowed (scenario mode)
7 if (player->is_building_type_allowed(*x.current)) {
8- Building_Descr const & bld = *tribe->get_building_descr(*x.current);
9- BuildingObserver & en_bo = get_building_observer(bld.name().c_str());
10
11 // Check if mine needs an enhancement to mine more resources
12 uint8_t const until =
13
14=== modified file 'src/scripting/lua_game.cc'
15--- src/scripting/lua_game.cc 2010-11-21 11:44:22 +0000
16+++ src/scripting/lua_game.cc 2011-02-19 20:44:03 +0000
17@@ -570,7 +570,6 @@
18 */
19 int L_Player::add_objective(lua_State * L) {
20 Game & game = get_game(L);
21- Player & p = get(L, game);
22
23 Map * map = game.get_map();
24 Manager<Objective> & mom = map->mom();

Subscribers

People subscribed via source and target branches

to status/vote changes: