widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #05477
[Merge] lp:~widelands-dev/widelands/codecheck_compiler_fixes into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/codecheck_compiler_fixes into lp:widelands.
Commit message:
- Fixed some codecheck and compiler warnings
- Fixed crash with assert in launch_mpg when selection of game or map to load is cancelled.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/codecheck_compiler_fixes/+merge/283722
- Fixed some codecheck and compiler warnings
- Fixed crash with assert in launch_mpg when selection of game or map to load is cancelled.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/codecheck_compiler_fixes into lp:widelands.
=== modified file 'src/graphic/text/sdl_ttf_font.cc'
--- src/graphic/text/sdl_ttf_font.cc 2016-01-19 08:55:16 +0000
+++ src/graphic/text/sdl_ttf_font.cc 2016-01-23 16:04:34 +0000
@@ -19,6 +19,8 @@
#include "graphic/text/sdl_ttf_font.h"
+#include <memory>
+
#include <SDL.h>
#include <SDL_ttf.h>
#include <boost/format.hpp>
=== modified file 'src/graphic/texture_cache.cc'
--- src/graphic/texture_cache.cc 2016-01-19 08:55:16 +0000
+++ src/graphic/texture_cache.cc 2016-01-23 16:04:34 +0000
@@ -19,12 +19,12 @@
#include "graphic/texture_cache.h"
+#include <memory>
#include <stdint.h>
#include <SDL.h>
#include "graphic/texture.h"
-#include "base/log.h" // NOCOM(#sirver): remove again
// The implementation took inspiration from
// http://timday.bitbucket.org/lru.html, but our use case here is a little
=== modified file 'src/ui_fsmenu/launch_mpg.cc'
--- src/ui_fsmenu/launch_mpg.cc 2016-01-17 08:29:59 +0000
+++ src/ui_fsmenu/launch_mpg.cc 2016-01-23 16:04:34 +0000
@@ -348,14 +348,12 @@
(this, m_ctrl, get_w() / 3, get_h() / 4);
auto result = selection_window.run<FullscreenMenuBase::MenuTarget>();
assert(result == FullscreenMenuBase::MenuTarget::kNormalGame ||
- result == FullscreenMenuBase::MenuTarget::kScenarioGame);
- switch (result) {
- case FullscreenMenuBase::MenuTarget::kNormalGame:
- select_map();
- break;
- case FullscreenMenuBase::MenuTarget::kScenarioGame:
- select_saved_game();
- break;
+ result == FullscreenMenuBase::MenuTarget::kScenarioGame ||
+ result == FullscreenMenuBase::MenuTarget::kBack);
+ if (result == FullscreenMenuBase::MenuTarget::kNormalGame) {
+ select_map();
+ } else if (result == FullscreenMenuBase::MenuTarget::kScenarioGame) {
+ select_saved_game();
}
}
Follow ups