widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #01953
[Merge] lp:~hjd/widelands/code-cleanup into lp:widelands
Hans Joachim Desserud has proposed merging lp:~hjd/widelands/code-cleanup into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~hjd/widelands/code-cleanup/+merge/216125
Some clean-ups suggested by cppcheck.
--
https://code.launchpad.net/~hjd/widelands/code-cleanup/+merge/216125
Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/code-cleanup into lp:widelands.
=== modified file 'src/sound/sound_handler.cc'
--- src/sound/sound_handler.cc 2014-04-16 08:46:08 +0000
+++ src/sound/sound_handler.cc 2014-04-16 14:55:30 +0000
@@ -236,7 +236,7 @@
const std::string & filename,
const std::string & fx_name)
{
- filenameset_t dirs, files;
+ filenameset_t files;
filenameset_t::const_iterator i;
assert(g_fs);
@@ -509,7 +509,6 @@
assert(g_fs);
filenameset_t files;
- filenameset_t::const_iterator i;
files = filter(g_fs->ListDirectory(dir), [&basename](const std::string& fn) {
const std::string only_filename = FileSystem::FS_Filename(fn.c_str());
=== modified file 'src/wui/military_box.cc'
--- src/wui/military_box.cc 2014-02-22 18:04:02 +0000
+++ src/wui/military_box.cc 2014-04-16 14:55:30 +0000
@@ -119,9 +119,8 @@
}
void MilitaryBox::init() {
- char buf[10];
-
{ // Retreat line
+ char buf[10];
UI::Box & linebox = *new UI::Box(this, 0, 0, UI::Box::Horizontal);
add(&linebox, UI::Box::AlignTop);
=== modified file 'src/wui/shipwindow.cc'
--- src/wui/shipwindow.cc 2014-03-03 20:50:30 +0000
+++ src/wui/shipwindow.cc 2014-04-16 14:55:30 +0000
@@ -247,13 +247,11 @@
*/
m_btn_construct_port->set_enabled(can_act && (state == Ship::EXP_FOUNDPORTSPACE));
bool coast_nearby = false;
- bool moveable = false;
for (Direction dir = 1; dir <= LAST_DIRECTION; ++dir) {
// NOTE buttons are saved in the format DIRECTION - 1
m_btn_scout[dir - 1]->set_enabled
(can_act && m_ship.exp_dir_swimable(dir) && (state != Ship::EXP_COLONIZING));
coast_nearby |= !m_ship.exp_dir_swimable(dir);
- moveable |= m_ship.exp_dir_swimable(dir);
}
m_btn_explore_island_cw ->set_enabled(can_act && coast_nearby && (state != Ship::EXP_COLONIZING));
m_btn_explore_island_ccw->set_enabled(can_act && coast_nearby && (state != Ship::EXP_COLONIZING));