← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/clang5-warnings-destructors into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/clang5-warnings-destructors into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/clang5-warnings-destructors/+merge/334286

Do not review yet.

I picked these up from Travis. My own clang version is too old to show them, so I'll wait for another Travis build to check if I missed any.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/clang5-warnings-destructors into lp:widelands.
=== modified file '.travis.yml'
--- .travis.yml	2017-10-24 19:18:57 +0000
+++ .travis.yml	2017-11-26 15:14:45 +0000
@@ -26,8 +26,8 @@
         key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key";
       - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.5 main"
         key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key";
-      - llvm-toolchain-trusty-3.9
       - llvm-toolchain-trusty-4.0
+      - llvm-toolchain-trusty-5.0
     packages:
       - cmake
       - libboost-dev
@@ -60,22 +60,22 @@
       env: CLANG_VERSION="3.5" BUILD_TYPE="Debug"
     - os: linux
       compiler: clang
-      env: CLANG_VERSION="3.9" BUILD_TYPE="Debug"
-    - os: linux
-      compiler: clang
       env: CLANG_VERSION="4.0" BUILD_TYPE="Debug"
     - os: linux
       compiler: clang
+      env: CLANG_VERSION="5.0" BUILD_TYPE="Debug"
+    - os: linux
+      compiler: clang
       env: CLANG_VERSION="3.4" BUILD_TYPE="Release"
     - os: linux
       compiler: clang
       env: CLANG_VERSION="3.5" BUILD_TYPE="Release"
     - os: linux
       compiler: clang
-      env: CLANG_VERSION="3.9" BUILD_TYPE="Release"
-    - os: linux
-      compiler: clang
       env: CLANG_VERSION="4.0" BUILD_TYPE="Release"
+    - os: linux
+      compiler: clang
+      env: CLANG_VERSION="5.0" BUILD_TYPE="Release"
     ### LINUX + GCC BUILDS
     - os: linux
       compiler: gcc

=== modified file 'src/economy/idleworkersupply.h'
--- src/economy/idleworkersupply.h	2017-06-24 08:47:46 +0000
+++ src/economy/idleworkersupply.h	2017-11-26 15:14:45 +0000
@@ -28,7 +28,7 @@
 
 struct IdleWorkerSupply : public Supply {
 	explicit IdleWorkerSupply(Worker&);
-	~IdleWorkerSupply();
+	~IdleWorkerSupply() override;
 
 	void set_economy(Economy*);
 	PlayerImmovable* get_position(Game&) override;

=== modified file 'src/economy/ware_instance.h'
--- src/economy/ware_instance.h	2017-08-16 10:14:29 +0000
+++ src/economy/ware_instance.h	2017-11-26 15:14:45 +0000
@@ -60,7 +60,7 @@
 
 public:
 	WareInstance(DescriptionIndex, const WareDescr* const);
-	~WareInstance();
+	~WareInstance() override;
 
 	MapObject* get_location(EditorGameBase& egbase) {
 		return location_.get(egbase);

=== modified file 'src/graphic/texture.h'
--- src/graphic/texture.h	2016-11-03 07:20:57 +0000
+++ src/graphic/texture.h	2017-11-26 15:14:45 +0000
@@ -41,7 +41,7 @@
 	// another texture. Ownership of 'texture' is not taken.
 	Texture(const GLuint texture, const Recti& subrect, int parent_w, int parent_h);
 
-	virtual ~Texture();
+	~Texture() override;
 
 	// Implements Surface
 	int width() const override;

=== modified file 'src/io/filesystem/layered_filesystem.h'
--- src/io/filesystem/layered_filesystem.h	2017-08-18 14:27:26 +0000
+++ src/io/filesystem/layered_filesystem.h	2017-11-26 15:14:45 +0000
@@ -46,7 +46,7 @@
 class LayeredFileSystem : public FileSystem {
 public:
 	LayeredFileSystem();
-	virtual ~LayeredFileSystem();
+	~LayeredFileSystem() override;
 
 	// Add a new filesystem to the top of the stack. Take ownership of the given
 	// filesystem.

=== modified file 'src/io/filesystem/zip_filesystem.h'
--- src/io/filesystem/zip_filesystem.h	2017-06-24 08:47:46 +0000
+++ src/io/filesystem/zip_filesystem.h	2017-11-26 15:14:45 +0000
@@ -34,7 +34,7 @@
 class ZipFilesystem : public FileSystem {
 public:
 	explicit ZipFilesystem(const std::string&);
-	virtual ~ZipFilesystem();
+	~ZipFilesystem() override;
 
 	bool is_writable() const override;
 
@@ -122,7 +122,7 @@
 
 	struct ZipStreamRead : StreamRead {
 		explicit ZipStreamRead(const std::shared_ptr<ZipFile>& shared_data);
-		virtual ~ZipStreamRead();
+		~ZipStreamRead() override;
 		size_t data(void* data, size_t bufsize) override;
 		bool end_of_file() const override;
 
@@ -132,7 +132,7 @@
 
 	struct ZipStreamWrite : StreamWrite {
 		explicit ZipStreamWrite(const std::shared_ptr<ZipFile>& shared_data);
-		virtual ~ZipStreamWrite();
+		~ZipStreamWrite() override;
 		void data(const void* const data, size_t size) override;
 
 	private:

=== modified file 'src/logic/game.h'
--- src/logic/game.h	2017-11-06 20:19:56 +0000
+++ src/logic/game.h	2017-11-26 15:14:45 +0000
@@ -99,7 +99,7 @@
 	friend struct GameLoader;
 
 	Game();
-	~Game();
+	~Game() override;
 
 	// life cycle
 	void set_game_controller(GameController*);
@@ -265,7 +265,7 @@
 		     syncstreamsave_(false) {
 		}
 
-		~SyncWrapper();
+		~SyncWrapper() override;
 
 		/// Start dumping the entire syncstream into a file.
 		///

=== modified file 'src/logic/map.h'
--- src/logic/map.h	2017-11-04 18:18:07 +0000
+++ src/logic/map.h	2017-11-26 15:14:45 +0000
@@ -99,7 +99,7 @@
 	bool accept(Bob*) const override {
 		return true;
 	}
-	virtual ~FindBobAlwaysTrue() {
+	~FindBobAlwaysTrue() override {
 	}  // make gcc shut up
 };
 
@@ -148,7 +148,7 @@
 	enum { NO_SCENARIO = 0, SP_SCENARIO = 1, MP_SCENARIO = 2 };
 
 	Map();
-	virtual ~Map();
+	~Map() override;
 
 	/// Returns the correct initialized loader for the given mapfile
 	std::unique_ptr<MapLoader> get_correct_loader(const std::string& filename);

=== modified file 'src/logic/map_objects/bob.h'
--- src/logic/map_objects/bob.h	2017-09-22 09:26:28 +0000
+++ src/logic/map_objects/bob.h	2017-11-26 15:14:45 +0000
@@ -351,7 +351,7 @@
 
 protected:
 	explicit Bob(const BobDescr& descr);
-	virtual ~Bob();
+	~Bob() override;
 
 private:
 	void do_act(Game&);

=== modified file 'src/logic/map_objects/immovable.h'
--- src/logic/map_objects/immovable.h	2017-06-24 08:47:46 +0000
+++ src/logic/map_objects/immovable.h	2017-11-26 15:14:45 +0000
@@ -207,7 +207,7 @@
 	/// display information about it.
 	Immovable(const ImmovableDescr&,
 	          const Widelands::BuildingDescr* former_building_descr = nullptr);
-	~Immovable();
+	~Immovable() override;
 
 	Coords get_position() const {
 		return position_;
@@ -330,7 +330,7 @@
  */
 struct PlayerImmovable : public BaseImmovable {
 	explicit PlayerImmovable(const MapObjectDescr&);
-	virtual ~PlayerImmovable();
+	~PlayerImmovable() override;
 
 	Player* get_owner() const {
 		return owner_;

=== modified file 'src/logic/map_objects/tribes/carrier.h'
--- src/logic/map_objects/tribes/carrier.h	2017-06-25 19:12:30 +0000
+++ src/logic/map_objects/tribes/carrier.h	2017-11-26 15:14:45 +0000
@@ -57,7 +57,7 @@
 	explicit Carrier(const CarrierDescr& carrier_descr)
 	   : Worker(carrier_descr), promised_pickup_to_(NOONE) {
 	}
-	virtual ~Carrier() {
+	~Carrier() override {
 	}
 
 	bool notify_ware(Game&, int32_t flag);

=== modified file 'src/logic/map_objects/tribes/militarysite.h'
--- src/logic/map_objects/tribes/militarysite.h	2017-08-16 13:23:15 +0000
+++ src/logic/map_objects/tribes/militarysite.h	2017-11-26 15:14:45 +0000
@@ -81,7 +81,7 @@
 
 public:
 	explicit MilitarySite(const MilitarySiteDescr&);
-	virtual ~MilitarySite();
+	~MilitarySite() override;
 
 	bool init(EditorGameBase&) override;
 	void cleanup(EditorGameBase&) override;

=== modified file 'src/logic/map_objects/tribes/production_program.h'
--- src/logic/map_objects/tribes/production_program.h	2017-06-24 08:47:46 +0000
+++ src/logic/map_objects/tribes/production_program.h	2017-11-26 15:14:45 +0000
@@ -153,7 +153,7 @@
 	/// is implicitly set to Completed.
 	struct ActReturn : public Action {
 		ActReturn(char* parameters, const ProductionSiteDescr&, const Tribes& tribes);
-		virtual ~ActReturn();
+		~ActReturn() override;
 		void execute(Game&, ProductionSite&) const override;
 
 		struct Condition {
@@ -168,7 +168,7 @@
 			Negation(char*& parameters, const ProductionSiteDescr& descr, const Tribes& tribes)
 			   : operand(create_condition(parameters, descr, tribes)) {
 			}
-			virtual ~Negation();
+			~Negation() override;
 			bool evaluate(const ProductionSite&) const override;
 			// Just a dummy to satisfy the superclass interface. Do not use.
 			std::string description(const Tribes&) const override;

=== modified file 'src/logic/map_objects/tribes/productionsite.h'
--- src/logic/map_objects/tribes/productionsite.h	2017-09-20 08:21:31 +0000
+++ src/logic/map_objects/tribes/productionsite.h	2017-11-26 15:14:45 +0000
@@ -163,7 +163,7 @@
 
 public:
 	explicit ProductionSite(const ProductionSiteDescr& descr);
-	virtual ~ProductionSite();
+	~ProductionSite() override;
 
 	void log_general_info(const EditorGameBase&) override;
 

=== modified file 'src/logic/map_objects/tribes/ship.h'
--- src/logic/map_objects/tribes/ship.h	2017-08-27 15:49:55 +0000
+++ src/logic/map_objects/tribes/ship.h	2017-11-26 15:14:45 +0000
@@ -99,7 +99,7 @@
 	MO_DESCR(ShipDescr)
 
 	explicit Ship(const ShipDescr& descr);
-	virtual ~Ship();
+	~Ship() override;
 
 	// Returns the fleet the ship is a part of.
 	Fleet* get_fleet() const;

=== modified file 'src/logic/map_objects/tribes/warehouse.h'
--- src/logic/map_objects/tribes/warehouse.h	2017-08-18 14:27:26 +0000
+++ src/logic/map_objects/tribes/warehouse.h	2017-11-26 15:14:45 +0000
@@ -128,7 +128,7 @@
 	};
 
 	explicit Warehouse(const WarehouseDescr&);
-	virtual ~Warehouse();
+	~Warehouse() override;
 
 	void load_finish(EditorGameBase&) override;
 

=== modified file 'src/logic/map_objects/tribes/worker.h'
--- src/logic/map_objects/tribes/worker.h	2017-09-22 20:47:13 +0000
+++ src/logic/map_objects/tribes/worker.h	2017-11-26 15:14:45 +0000
@@ -72,7 +72,7 @@
 
 public:
 	explicit Worker(const WorkerDescr&);
-	virtual ~Worker();
+	~Worker() override;
 
 	Player& owner() const {
 		assert(get_owner());

=== modified file 'src/scripting/logic.h'
--- src/scripting/logic.h	2017-06-24 08:47:46 +0000
+++ src/scripting/logic.h	2017-11-26 15:14:45 +0000
@@ -32,7 +32,7 @@
 class LuaEditorInterface : public LuaInterface {
 public:
 	explicit LuaEditorInterface(Widelands::EditorGameBase* g);
-	virtual ~LuaEditorInterface();
+	~LuaEditorInterface() override;
 
 	std::unique_ptr<LuaTable> run_script(const std::string& script) override;
 
@@ -43,7 +43,7 @@
 class LuaGameInterface : public LuaInterface {
 public:
 	explicit LuaGameInterface(Widelands::Game* g);
-	virtual ~LuaGameInterface();
+	~LuaGameInterface() override;
 
 	// Returns a given hook if one is defined, otherwise returns 0
 	std::unique_ptr<LuaTable> get_hook(const std::string& name);

=== modified file 'src/scripting/test/test_luna.cc'
--- src/scripting/test/test_luna.cc	2017-06-24 08:47:46 +0000
+++ src/scripting/test/test_luna.cc	2017-11-26 15:14:45 +0000
@@ -57,7 +57,7 @@
 	}
 	LuaClass() : x(123), prop(246) {
 	}
-	virtual ~LuaClass();
+	~LuaClass() override;
 	explicit LuaClass(lua_State* /* L */) : x(124), prop(248) {
 	}
 	virtual int test(lua_State* L) {

=== modified file 'src/ui_basic/editbox.h'
--- src/ui_basic/editbox.h	2017-06-23 17:23:04 +0000
+++ src/ui_basic/editbox.h	2017-11-26 15:14:45 +0000
@@ -51,7 +51,7 @@
 	        int margin_y = 2,
 	        const Image* background = g_gr->images().get("images/ui_basic/but2.png"),
 	        int font_size = UI_FONT_SIZE_SMALL);
-	virtual ~EditBox();
+	~EditBox() override;
 
 	boost::signals2::signal<void()> changed;
 	boost::signals2::signal<void()> ok;

=== modified file 'src/ui_basic/radiobutton.h'
--- src/ui_basic/radiobutton.h	2017-01-25 18:55:59 +0000
+++ src/ui_basic/radiobutton.h	2017-11-26 15:14:45 +0000
@@ -35,7 +35,7 @@
 	friend struct Radiogroup;
 
 	Radiobutton(Panel* parent, Vector2i, const Image* pic, Radiogroup&, int32_t id);
-	~Radiobutton();
+	~Radiobutton() override;
 
 	Radiobutton* next_button() {
 		return nextbtn_;

=== modified file 'src/wui/building_statistics_menu.h'
--- src/wui/building_statistics_menu.h	2017-01-25 18:55:59 +0000
+++ src/wui/building_statistics_menu.h	2017-11-26 15:14:45 +0000
@@ -43,7 +43,7 @@
 /// It also allows to jump through buildings on the map.
 struct BuildingStatisticsMenu : public UI::UniqueWindow {
 	BuildingStatisticsMenu(InteractivePlayer&, UI::UniqueWindow::Registry&);
-	~BuildingStatisticsMenu();
+	~BuildingStatisticsMenu() override;
 
 	void think() override;
 	void update();

=== modified file 'src/wui/chatoverlay.h'
--- src/wui/chatoverlay.h	2017-01-25 18:55:59 +0000
+++ src/wui/chatoverlay.h	2017-11-26 15:14:45 +0000
@@ -33,7 +33,7 @@
  */
 struct ChatOverlay : public UI::Panel {
 	ChatOverlay(UI::Panel* parent, int32_t x, int32_t y, int32_t w, int32_t h);
-	~ChatOverlay();
+	~ChatOverlay() override;
 
 	void set_chat_provider(ChatProvider&);
 	void draw(RenderTarget&) override;

=== modified file 'src/wui/interactive_base.h'
--- src/wui/interactive_base.h	2017-09-13 07:27:00 +0000
+++ src/wui/interactive_base.h	2017-11-26 15:14:45 +0000
@@ -81,7 +81,7 @@
 	UniqueWindowHandler& unique_windows();
 
 	InteractiveBase(Widelands::EditorGameBase&, Section& global_s);
-	virtual ~InteractiveBase();
+	~InteractiveBase() override;
 
 	Widelands::EditorGameBase& egbase() const {
 		return egbase_;


Follow ups