← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/clang_36 into lp:widelands

 

SirVer has proposed merging lp:~widelands-dev/widelands/clang_36 into lp:widelands.

Requested reviews:
  GunChleoc (gunchleoc)
Related bugs:
  Bug #1440396 in widelands: "FTBFS with clang 3.6"
  https://bugs.launchpad.net/widelands/+bug/1440396

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/clang_36/+merge/256735

Compile time fixes for clang 3.6.

Gun, there are functional changes that affect your menu refactorings. Could you have a look?
-- 
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/clang_36.
=== modified file 'src/ai/ai_hints.cc'
--- src/ai/ai_hints.cc	2015-03-26 06:59:37 +0000
+++ src/ai/ai_hints.cc	2015-04-18 11:32:21 +0000
@@ -48,7 +48,8 @@
 		} else {
 			if (!strcmp(section ? section->get_string("trainingsite_type", "basic") : "basic", "basic")) {
 				trainingsite_type_ =  TrainingSiteType::kBasic;
-			} else if (!strcmp(section ? section->get_string("trainingsite_type", "basic") : "basic", "advanced")) {
+			} else if (!strcmp(section ? section->get_string("trainingsite_type", "basic") : "basic",
+			                   "advanced")) {
 				trainingsite_type_ =  TrainingSiteType::kAdvanced;
 			} else {
 				trainingsite_type_ = TrainingSiteType::kNoTS;

=== modified file 'src/base/log.h'
--- src/base/log.h	2014-07-05 16:41:51 +0000
+++ src/base/log.h	2015-04-18 11:32:21 +0000
@@ -30,9 +30,9 @@
 
 // printf macros for size_t, in the style of inttypes.h
 #ifdef _LP64
-#define __PRIS_PREFIX "z"
+#define PRIS_PREFIX "z"
 #else
-#define __PRIS_PREFIX
+#define PRIS_PREFIX
 #endif
 
 // Use these macros after a % in a printf format string
@@ -40,11 +40,11 @@
 // size_t size = records.size();
 // printf("%" PRIuS "\n", size);
 
-#define PRIdS __PRIS_PREFIX "d"
-#define PRIxS __PRIS_PREFIX "x"
-#define PRIuS __PRIS_PREFIX "u"
-#define PRIXS __PRIS_PREFIX "X"
-#define PRIoS __PRIS_PREFIX "o"
+#define PRIdS PRIS_PREFIX "d"
+#define PRIxS PRIS_PREFIX "x"
+#define PRIuS PRIS_PREFIX "u"
+#define PRIXS PRIS_PREFIX "X"
+#define PRIoS PRIS_PREFIX "o"
 
 // Print a formatted log messages to wout.
 // wout is either std::cout or specified logfile.

=== modified file 'src/config.h.cmake'
--- src/config.h.cmake	2014-11-13 11:25:03 +0000
+++ src/config.h.cmake	2015-04-18 11:32:21 +0000
@@ -1,5 +1,5 @@
-#ifndef __CONFIG_H__
-#define __CONFIG_H__
+#ifndef CONFIG_H
+#define CONFIG_H
 
 // This is the path where the data files are located; If this is an absolute
 // path (i.e. starting with a /), it will be interpreted as such. If it is a
@@ -11,4 +11,4 @@
 // True if getenv has been found.
 #define HAS_GETENV
 
-#endif /* __CONFIG_H__ */
+#endif /* CONFIG_H */

=== modified file 'src/graphic/font_handler1.cc'
--- src/graphic/font_handler1.cc	2014-12-14 12:26:29 +0000
+++ src/graphic/font_handler1.cc	2015-04-18 11:32:21 +0000
@@ -128,9 +128,9 @@
 		return image_cache_->insert(hash, std::move(image));
 	}
 
-	UI::FontSet& fontset() const {return *fontset_.get();}
+	UI::FontSet& fontset() const override {return *fontset_.get();}
 
-	void reinitialize_fontset() {
+	void reinitialize_fontset() override {
 		fontset_.reset(new UI::FontSet(i18n::get_locale()));
 		rt_renderer_.reset(new RT::Renderer(image_cache_, texture_cache_.get(), fontset_.get()));
 	}

=== modified file 'src/logic/ship.h'
--- src/logic/ship.h	2015-04-07 20:56:02 +0000
+++ src/logic/ship.h	2015-04-18 11:32:21 +0000
@@ -206,7 +206,7 @@
 	void exp_scouting_direction(Game &, WalkingDir);
 	void exp_construct_port (Game &, const Coords&);
 	void exp_explore_island (Game &, IslandExploreDirection);
-	
+
 	//Returns integer of direction, or WalkingDir::IDLE if query invalid
 	//Intended for LUA scripting
 	WalkingDir get_scouting_direction();

=== modified file 'src/scripting/lua_map.cc'
--- src/scripting/lua_map.cc	2015-04-07 20:56:02 +0000
+++ src/scripting/lua_map.cc	2015-04-18 11:32:21 +0000
@@ -2843,7 +2843,7 @@
 
 	Warehouse* wh = get(L, get_egbase(L));
 
-	if (upcast(Game, game, &get_egbase(L))) {
+	if (is_a(Game, &get_egbase(L))) {
 		PortDock* pd = wh->get_portdock();
 		if (pd) {
 			if (pd->expedition_started()){
@@ -3402,7 +3402,7 @@
 */
 // UNTESTED sink states
 int LuaShip::get_state(lua_State* L) {
-	if (upcast(Game, game, &get_egbase(L))) {
+	if (is_a(Game, &get_egbase(L))) {
 		switch (get(L, get_egbase(L))->get_ship_state()) {
 			case Ship::TRANSPORT:
 				lua_pushstring(L, "transport");
@@ -3435,7 +3435,7 @@
 }
 
 int LuaShip::get_scouting_direction(lua_State* L) {
-	if (upcast(Game, game, &get_egbase(L))) {
+	if (is_a(Game, &get_egbase(L))) {
 		switch (get(L, get_egbase(L))->get_scouting_direction()) {
 			case WalkingDir::WALK_NE:
 				lua_pushstring(L, "ne");
@@ -3498,7 +3498,7 @@
 
 */
 int LuaShip::get_island_explore_direction(lua_State* L) {
-	if (upcast(Game, game, &get_egbase(L))) {
+	if (is_a(Game, &get_egbase(L))) {
 		switch (get(L, get_egbase(L))->get_island_explore_direction()) {
 			case IslandExploreDirection::kCounterClockwise:
 				lua_pushstring(L, "ccw");

=== modified file 'src/scripting/luna.h'
--- src/scripting/luna.h	2015-02-05 11:10:14 +0000
+++ src/scripting/luna.h	2015-04-18 11:32:21 +0000
@@ -45,19 +45,19 @@
 /*
  * Macros for helping with persistence and unpersistence
  */
-#define _PERS_TYPE(name, value, type) \
+#define PERS_TYPE(name, value, type) \
    lua_push ##type(L, value); \
    lua_setfield(L, -2, name)
-#define PERS_INT32(name, value) _PERS_TYPE(name, value, int32)
-#define PERS_UINT32(name, value) _PERS_TYPE(name, value, uint32)
-#define PERS_STRING(name, value) _PERS_TYPE(name, value.c_str(), string)
+#define PERS_INT32(name, value) PERS_TYPE(name, value, int32)
+#define PERS_UINT32(name, value) PERS_TYPE(name, value, uint32)
+#define PERS_STRING(name, value) PERS_TYPE(name, value.c_str(), string)
 
-#define _UNPERS_TYPE(name, value, type) lua_getfield(L, lua_upvalueindex(1), name); \
+#define UNPERS_TYPE(name, value, type) lua_getfield(L, lua_upvalueindex(1), name); \
    value = luaL_check ##type(L, -1); \
    lua_pop(L, 1);
-#define UNPERS_INT32(name, value) _UNPERS_TYPE(name, value, int32)
-#define UNPERS_UINT32(name, value) _UNPERS_TYPE(name, value, uint32)
-#define UNPERS_STRING(name, value) _UNPERS_TYPE(name, value, string)
+#define UNPERS_INT32(name, value) UNPERS_TYPE(name, value, int32)
+#define UNPERS_UINT32(name, value) UNPERS_TYPE(name, value, uint32)
+#define UNPERS_STRING(name, value) UNPERS_TYPE(name, value, string)
 
 #include <cstring>
 

=== modified file 'src/ui_basic/editbox.h'
--- src/ui_basic/editbox.h	2014-11-22 10:18:20 +0000
+++ src/ui_basic/editbox.h	2015-04-18 11:32:21 +0000
@@ -62,7 +62,7 @@
 	bool handle_mousepress(uint8_t btn, int32_t x, int32_t y) override;
 	bool handle_mouserelease(uint8_t btn, int32_t x, int32_t y) override;
 	bool handle_key(bool down, SDL_Keysym) override;
-	bool handle_textinput(const std::string& text);
+	bool handle_textinput(const std::string& text) override;
 
 	void draw(RenderTarget &) override;
 

=== modified file 'src/ui_basic/multilineeditbox.h'
--- src/ui_basic/multilineeditbox.h	2014-11-22 10:18:20 +0000
+++ src/ui_basic/multilineeditbox.h	2015-04-18 11:32:21 +0000
@@ -53,7 +53,7 @@
 	void draw(RenderTarget &) override;
 
 	bool handle_key(bool down, SDL_Keysym) override;
-	bool handle_textinput(const std::string& text);
+	bool handle_textinput(const std::string& text) override;
 
 private:
 	void scrollpos_changed(int32_t);

=== modified file 'src/ui_fsmenu/loadgame.h'
--- src/ui_fsmenu/loadgame.h	2014-11-13 08:39:14 +0000
+++ src/ui_fsmenu/loadgame.h	2015-04-18 11:32:21 +0000
@@ -76,7 +76,7 @@
 
 	const std::string & filename() {return m_filename;}
 
-	void think();
+	void think() override;
 
 	bool handle_key(bool down, SDL_Keysym code) override;
 

=== modified file 'src/ui_fsmenu/main.cc'
--- src/ui_fsmenu/main.cc	2014-11-13 11:29:20 +0000
+++ src/ui_fsmenu/main.cc	2015-04-18 11:32:21 +0000
@@ -31,7 +31,7 @@
 	// Buttons
 	// This box needs to be a bit higher than in the other menus, because we have a lot of buttons
 	vbox(this, m_box_x, m_box_y - m_buth, UI::Box::Vertical,
-		  m_butw, get_h() - vbox.get_y(), m_padding),
+		  m_butw, get_h() - (m_box_y - m_buth), m_padding),
 	playtutorial
 		(&vbox, "play_tutorial", 0, 0, m_butw, m_buth, g_gr->images().get(m_button_background),
 		 _("Play Tutorial"), "", true, false),

=== modified file 'src/ui_fsmenu/multiplayer.cc'
--- src/ui_fsmenu/multiplayer.cc	2014-12-06 12:22:35 +0000
+++ src/ui_fsmenu/multiplayer.cc	2015-04-18 11:32:21 +0000
@@ -35,7 +35,7 @@
 
 // Buttons
 	vbox(this, m_box_x, m_box_y, UI::Box::Vertical,
-		  m_butw, get_h() - vbox.get_y(), m_padding),
+		  m_butw, get_h() - m_box_y, m_padding),
 	metaserver
 		(&vbox, "metaserver", 0, 0, m_butw, m_buth, g_gr->images().get(m_button_background),
 		 _("Internet game"), "", true, false),

=== modified file 'src/ui_fsmenu/singleplayer.cc'
--- src/ui_fsmenu/singleplayer.cc	2014-12-06 12:22:35 +0000
+++ src/ui_fsmenu/singleplayer.cc	2015-04-18 11:32:21 +0000
@@ -34,7 +34,7 @@
 
 // Buttons
 	vbox(this, m_box_x, m_box_y, UI::Box::Vertical,
-		  m_butw, get_h() - vbox.get_y(), m_padding),
+		  m_butw, get_h() - m_box_y, m_padding),
 	new_game
 		(&vbox, "new_game", 0, 0, m_butw, m_buth, g_gr->images().get(m_button_background),
 		 _("New Game"), "", true, false),

=== modified file 'src/wui/interactive_base.h'
--- src/wui/interactive_base.h	2014-11-30 12:23:45 +0000
+++ src/wui/interactive_base.h	2015-04-18 11:32:21 +0000
@@ -98,8 +98,6 @@
 	void move_view_to(Widelands::Coords);
 	void move_view_to_point(Point pos);
 
-	virtual void start() = 0;
-
 	//  display flags
 	uint32_t get_display_flags() const;
 	void set_display_flags(uint32_t flags);


Follow ups