Merge lp:~widelands-dev/widelands/bug-986611-cppcheck-explicit-constructors into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8388
Proposed branch: lp:~widelands-dev/widelands/bug-986611-cppcheck-explicit-constructors
Merge into: lp:widelands
Diff against target: 2713 lines (+287/-287)
112 files modified
src/ai/ai_help_structs.h (+6/-6)
src/ai/ai_hints.h (+1/-1)
src/base/i18n.h (+1/-1)
src/economy/economy.h (+1/-1)
src/economy/economy_data_packet.h (+1/-1)
src/economy/expedition_bootstrap.h (+2/-2)
src/economy/fleet.h (+1/-1)
src/economy/idleworkersupply.h (+1/-1)
src/economy/portdock.h (+1/-1)
src/economy/router.h (+1/-1)
src/economy/shippingitem.h (+2/-2)
src/economy/trackptr.h (+3/-3)
src/economy/ware_instance.cc (+1/-1)
src/economy/warehousesupply.h (+1/-1)
src/editor/editorinteractive.h (+1/-1)
src/editor/tools/action_args.h (+1/-1)
src/editor/tools/place_critter_tool.h (+1/-1)
src/editor/tools/place_immovable_tool.h (+1/-1)
src/editor/tools/set_port_space_tool.h (+1/-1)
src/editor/ui_menus/main_menu_load_map.h (+1/-1)
src/editor/ui_menus/main_menu_new_map.h (+1/-1)
src/editor/ui_menus/main_menu_random_map.h (+1/-1)
src/editor/ui_menus/main_menu_save_map.h (+1/-1)
src/graphic/animation.cc (+1/-1)
src/graphic/font_handler1.cc (+1/-1)
src/graphic/gl/utils.cc (+1/-1)
src/graphic/image_io.h (+1/-1)
src/graphic/render_queue.cc (+1/-1)
src/graphic/rendertarget.h (+1/-1)
src/graphic/richtext.cc (+1/-1)
src/graphic/text/font_set.h (+1/-1)
src/graphic/text/rendered_text.h (+4/-4)
src/graphic/text/rt_errors.h (+2/-2)
src/graphic/text/rt_parse.h (+2/-2)
src/graphic/text/rt_render.cc (+5/-5)
src/graphic/text/textstream.h (+1/-1)
src/graphic/text/texture_cache.h (+1/-1)
src/graphic/text/transient_cache.h (+1/-1)
src/graphic/texture_atlas.h (+1/-1)
src/io/filesystem/disk_filesystem.cc (+3/-3)
src/io/filesystem/disk_filesystem.h (+1/-1)
src/io/filesystem/zip_filesystem.h (+1/-1)
src/logic/cmd_calculate_statistics.h (+1/-1)
src/logic/cmd_queue.h (+3/-3)
src/logic/editor_game_base.h (+1/-1)
src/logic/findbob.h (+2/-2)
src/logic/findimmovable.h (+6/-6)
src/logic/map_objects/bob.cc (+1/-1)
src/logic/map_objects/bob.h (+2/-2)
src/logic/map_objects/immovable.h (+2/-2)
src/logic/map_objects/map_object.h (+1/-1)
src/logic/map_objects/tribes/bill_of_materials.h (+1/-1)
src/logic/map_objects/tribes/building.h (+1/-1)
src/logic/map_objects/tribes/carrier.h (+1/-1)
src/logic/map_objects/tribes/constructionsite.h (+1/-1)
src/logic/map_objects/tribes/dismantlesite.h (+2/-2)
src/logic/map_objects/tribes/militarysite.h (+1/-1)
src/logic/map_objects/tribes/partially_finished_building.h (+1/-1)
src/logic/map_objects/tribes/production_program.h (+7/-7)
src/logic/map_objects/tribes/productionsite.h (+1/-1)
src/logic/map_objects/tribes/requirements.h (+1/-1)
src/logic/map_objects/tribes/ship.h (+1/-1)
src/logic/map_objects/tribes/soldier.cc (+1/-1)
src/logic/map_objects/tribes/soldier.h (+2/-2)
src/logic/map_objects/tribes/trainingsite.h (+1/-1)
src/logic/map_objects/tribes/tribe_basic_info.h (+1/-1)
src/logic/map_objects/tribes/warehouse.h (+2/-2)
src/logic/map_objects/tribes/worker.cc (+2/-2)
src/logic/map_objects/tribes/worker.h (+1/-1)
src/logic/map_objects/world/critter.h (+1/-1)
src/logic/map_objects/world/critter_program.h (+1/-1)
src/logic/map_objects/world/editor_category.h (+1/-1)
src/logic/map_objects/world/map_gen.h (+1/-1)
src/logic/map_objects/world/resource_description.h (+1/-1)
src/logic/map_objects/world/terrain_description.h (+1/-1)
src/logic/mapastar.h (+2/-2)
src/logic/objective.h (+1/-1)
src/logic/pathfield.h (+1/-1)
src/logic/playercommand.h (+31/-31)
src/logic/playersmanager.h (+1/-1)
src/logic/replay.cc (+1/-1)
src/logic/replay_game_controller.h (+1/-1)
src/logic/widelands_geometry_io.h (+1/-1)
src/map_io/map_players_view_packet.cc (+3/-3)
src/map_io/world_legacy_lookup_table.cc (+1/-1)
src/network/gamehost.cc (+3/-3)
src/network/netclient.h (+1/-1)
src/network/nethost.h (+2/-2)
src/network/network_lan_promotion.h (+1/-1)
src/network/network_player_settings_backend.h (+1/-1)
src/notifications/test/notifications_test.cc (+1/-1)
src/profile/profile.h (+3/-3)
src/scripting/logic.h (+2/-2)
src/scripting/lua_bases.h (+3/-3)
src/scripting/lua_coroutine.h (+1/-1)
src/scripting/lua_editor.h (+2/-2)
src/scripting/lua_errors.h (+2/-2)
src/scripting/lua_game.h (+6/-6)
src/scripting/lua_map.h (+72/-72)
src/scripting/lua_path.cc (+1/-1)
src/scripting/lua_root.h (+4/-4)
src/scripting/lua_table.h (+1/-1)
src/scripting/lua_ui.h (+10/-10)
src/scripting/test/test_luna.cc (+4/-4)
src/sound/fxset.h (+1/-1)
src/ui_basic/progresswindow.h (+1/-1)
src/ui_basic/table.h (+1/-1)
src/ui_fsmenu/campaign_select.h (+1/-1)
src/ui_fsmenu/options.h (+2/-2)
src/wui/interactive_base.cc (+1/-1)
src/wui/login_box.h (+1/-1)
src/wui/quicknavigation.h (+1/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-986611-cppcheck-explicit-constructors
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+326255@code.launchpad.net

Commit message

Made a bunch of constructors explicit.

Description of the change

This change is big but trivial. These are all "stupid" cases, but might protect us from a few regression in the future.

The principal aim is to get rid of a lot of noise in the cppcheck reports so that we can look into the interesting cases some time.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 2358. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/246562869.
Appveyor build 2186. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_986611_cppcheck_explicit_constructors-2186.

Revision history for this message
SirVer (sirver) wrote :

This is a great change! I wish c++ would not have this implicit 'implicit' construct....

@bunnybot merge

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for the review :)

I probably missed a lot of them, but I have it on the map now and will get into the habit of using them more.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ai/ai_help_structs.h'
2--- src/ai/ai_help_structs.h 2017-01-25 18:55:59 +0000
3+++ src/ai/ai_help_structs.h 2017-06-24 13:45:55 +0000
4@@ -171,7 +171,7 @@
5
6 // Fishers and fishbreeders must be built near water
7 struct FindNodeWater {
8- FindNodeWater(const World& world);
9+ explicit FindNodeWater(const World& world);
10
11 bool accept(const Map& /* map */, const FCoords& coord) const;
12
13@@ -183,7 +183,7 @@
14 // Open water is a field where all 6 adjacent triangles are water
15 struct FindNodeOpenWater {
16 // 'world' is unused, but we need to fit the template.
17- FindNodeOpenWater(const World& /* world */) {
18+ explicit FindNodeOpenWater(const World& /* world */) {
19 }
20
21 bool accept(const Map& /* map */, const FCoords& coord) const;
22@@ -228,7 +228,7 @@
23 };
24
25 struct BuildableField {
26- BuildableField(const Widelands::FCoords& fc);
27+ explicit BuildableField(const Widelands::FCoords& fc);
28
29 int32_t own_military_sites_nearby_();
30
31@@ -288,7 +288,7 @@
32 };
33
34 struct MineableField {
35- MineableField(const Widelands::FCoords& fc);
36+ explicit MineableField(const Widelands::FCoords& fc);
37
38 Widelands::FCoords coords;
39 uint32_t field_info_expiration;
40@@ -299,7 +299,7 @@
41 };
42
43 struct EconomyObserver {
44- EconomyObserver(Widelands::Economy& e);
45+ explicit EconomyObserver(Widelands::Economy& e);
46
47 Widelands::Economy& economy;
48 std::list<Widelands::Flag const*> flags;
49@@ -517,7 +517,7 @@
50 // list of candidate flags to build roads, with some additional logic
51 struct FlagsForRoads {
52
53- FlagsForRoads(int32_t mr) : min_reduction(mr) {
54+ explicit FlagsForRoads(int32_t mr) : min_reduction(mr) {
55 }
56
57 struct Candidate {
58
59=== modified file 'src/ai/ai_hints.h'
60--- src/ai/ai_hints.h 2017-05-25 07:16:05 +0000
61+++ src/ai/ai_hints.h 2017-06-24 13:45:55 +0000
62@@ -34,7 +34,7 @@
63 /// buildings conf file. It is used to tell the computer player about the
64 /// special properties of a building.
65 struct BuildingHints {
66- BuildingHints(std::unique_ptr<LuaTable>);
67+ explicit BuildingHints(std::unique_ptr<LuaTable>);
68 ~BuildingHints() {
69 }
70
71
72=== modified file 'src/base/i18n.h'
73--- src/base/i18n.h 2017-01-25 18:55:59 +0000
74+++ src/base/i18n.h 2017-06-24 13:45:55 +0000
75@@ -43,7 +43,7 @@
76 /// released when the object goes out of scope. This is exception-safe, unlike
77 /// calling grab_textdomain and release_textdomain directly.
78 struct Textdomain {
79- Textdomain(const std::string& name) {
80+ explicit Textdomain(const std::string& name) {
81 grab_textdomain(name);
82 }
83 ~Textdomain() {
84
85=== modified file 'src/economy/economy.h'
86--- src/economy/economy.h 2017-02-12 09:10:57 +0000
87+++ src/economy/economy.h 2017-06-24 13:45:55 +0000
88@@ -110,7 +110,7 @@
89 Time last_modified;
90 };
91
92- Economy(Player&);
93+ explicit Economy(Player&);
94 ~Economy();
95
96 Player& owner() const {
97
98=== modified file 'src/economy/economy_data_packet.h'
99--- src/economy/economy_data_packet.h 2017-01-25 18:55:59 +0000
100+++ src/economy/economy_data_packet.h 2017-06-24 13:45:55 +0000
101@@ -31,7 +31,7 @@
102
103 class EconomyDataPacket {
104 public:
105- EconomyDataPacket(Economy* e) : eco_(e) {
106+ explicit EconomyDataPacket(Economy* e) : eco_(e) {
107 }
108
109 void read(FileRead&);
110
111=== modified file 'src/economy/expedition_bootstrap.h'
112--- src/economy/expedition_bootstrap.h 2017-02-17 21:52:41 +0000
113+++ src/economy/expedition_bootstrap.h 2017-06-24 13:45:55 +0000
114@@ -49,7 +49,7 @@
115
116 class ExpeditionBootstrap {
117 public:
118- ExpeditionBootstrap(PortDock* const portdock);
119+ explicit ExpeditionBootstrap(PortDock* const portdock);
120 virtual ~ExpeditionBootstrap();
121
122 // Start bootstrapping an expedition. This will request all wares and workers.
123@@ -118,7 +118,7 @@
124
125 ExpeditionBootstrap* bootstrap;
126
127- NoteExpeditionCanceled(ExpeditionBootstrap* const init_bootstrap) : bootstrap(init_bootstrap) {
128+ explicit NoteExpeditionCanceled(ExpeditionBootstrap* const init_bootstrap) : bootstrap(init_bootstrap) {
129 }
130 };
131
132
133=== modified file 'src/economy/fleet.h'
134--- src/economy/fleet.h 2017-04-23 12:11:19 +0000
135+++ src/economy/fleet.h 2017-06-24 13:45:55 +0000
136@@ -75,7 +75,7 @@
137
138 const FleetDescr& descr() const;
139
140- Fleet(Player& player);
141+ explicit Fleet(Player& player);
142
143 Player* get_owner() const {
144 return &owner_;
145
146=== modified file 'src/economy/idleworkersupply.h'
147--- src/economy/idleworkersupply.h 2017-01-25 18:55:59 +0000
148+++ src/economy/idleworkersupply.h 2017-06-24 13:45:55 +0000
149@@ -27,7 +27,7 @@
150 class Economy;
151
152 struct IdleWorkerSupply : public Supply {
153- IdleWorkerSupply(Worker&);
154+ explicit IdleWorkerSupply(Worker&);
155 ~IdleWorkerSupply();
156
157 void set_economy(Economy*);
158
159=== modified file 'src/economy/portdock.h'
160--- src/economy/portdock.h 2017-04-23 12:11:19 +0000
161+++ src/economy/portdock.h 2017-06-24 13:45:55 +0000
162@@ -75,7 +75,7 @@
163 public:
164 const PortdockDescr& descr() const;
165
166- PortDock(Warehouse* warehouse);
167+ explicit PortDock(Warehouse* warehouse);
168 ~PortDock() override;
169
170 void add_position(Widelands::Coords where);
171
172=== modified file 'src/economy/router.h'
173--- src/economy/router.h 2017-01-25 18:55:59 +0000
174+++ src/economy/router.h 2017-06-24 13:45:55 +0000
175@@ -38,7 +38,7 @@
176 struct Router {
177 using ResetCycleFn = boost::function<void()>;
178
179- Router(const ResetCycleFn& reset);
180+ explicit Router(const ResetCycleFn& reset);
181
182 bool find_route(RoutingNode& start,
183 RoutingNode& end,
184
185=== modified file 'src/economy/shippingitem.h'
186--- src/economy/shippingitem.h 2017-01-25 18:55:59 +0000
187+++ src/economy/shippingitem.h 2017-06-24 13:45:55 +0000
188@@ -44,8 +44,8 @@
189 struct ShippingItem {
190 ShippingItem() {
191 }
192- ShippingItem(WareInstance& ware);
193- ShippingItem(Worker& worker);
194+ explicit ShippingItem(WareInstance& ware);
195+ explicit ShippingItem(Worker& worker);
196
197 // Unboxes the item that is shipped which might be either a ware or a
198 // worker. It is safe to pass nullptr for 'ware' or 'worker' in case you are
199
200=== modified file 'src/economy/trackptr.h'
201--- src/economy/trackptr.h 2017-01-25 18:55:59 +0000
202+++ src/economy/trackptr.h 2017-06-24 13:45:55 +0000
203@@ -46,7 +46,7 @@
204 Trackable* ptr_;
205
206 public:
207- Tracker(Trackable* const p) : refcount_(0), ptr_(p) {
208+ explicit Tracker(Trackable* const p) : refcount_(0), ptr_(p) {
209 }
210
211 void addref() {
212@@ -104,7 +104,7 @@
213 if (tracker_)
214 tracker_->deref();
215 }
216- BaseTrackPtr(Trackable* const t) {
217+ explicit BaseTrackPtr(Trackable* const t) {
218 if (t) {
219 tracker_ = t->tracker_;
220 tracker_->addref();
221@@ -160,7 +160,7 @@
222 TrackPtr() {
223 }
224
225- TrackPtr(T* ptr) : BaseTrackPtr(ptr) {
226+ explicit TrackPtr(T* ptr) : BaseTrackPtr(ptr) {
227 }
228 TrackPtr(const TrackPtr<T>& o) : BaseTrackPtr(o) {
229 }
230
231=== modified file 'src/economy/ware_instance.cc'
232--- src/economy/ware_instance.cc 2017-06-20 08:17:02 +0000
233+++ src/economy/ware_instance.cc 2017-06-24 13:45:55 +0000
234@@ -46,7 +46,7 @@
235 */
236 // TODO(unknown): This maybe shouldn't be here.
237 struct IdleWareSupply : public Supply {
238- IdleWareSupply(WareInstance&);
239+ explicit IdleWareSupply(WareInstance&);
240 virtual ~IdleWareSupply();
241
242 void set_economy(Economy*);
243
244=== modified file 'src/economy/warehousesupply.h'
245--- src/economy/warehousesupply.h 2017-01-25 18:55:59 +0000
246+++ src/economy/warehousesupply.h 2017-06-24 13:45:55 +0000
247@@ -31,7 +31,7 @@
248 It also manages the list of wares in the warehouse.
249 */
250 struct WarehouseSupply : public Supply {
251- WarehouseSupply(Warehouse* const wh) : economy_(nullptr), warehouse_(wh) {
252+ explicit WarehouseSupply(Warehouse* const wh) : economy_(nullptr), warehouse_(wh) {
253 }
254 virtual ~WarehouseSupply();
255
256
257=== modified file 'src/editor/editorinteractive.h'
258--- src/editor/editorinteractive.h 2017-01-25 18:55:59 +0000
259+++ src/editor/editorinteractive.h 2017-06-24 13:45:55 +0000
260@@ -86,7 +86,7 @@
261 EditorSetOriginTool set_origin;
262 EditorMakeInfrastructureTool make_infrastructure;
263 };
264- EditorInteractive(Widelands::EditorGameBase&);
265+ explicit EditorInteractive(Widelands::EditorGameBase&);
266
267 // Runs the Editor via the commandline --editor flag. Will load 'filename' as a
268 // map and run 'script_to_run' directly after all initialization is done.
269
270=== modified file 'src/editor/tools/action_args.h'
271--- src/editor/tools/action_args.h 2017-01-25 18:55:59 +0000
272+++ src/editor/tools/action_args.h 2017-06-24 13:45:55 +0000
273@@ -36,7 +36,7 @@
274 /// Class to save important and changeable properties of classes needed for actions
275 // Implementations in editor_history.cc
276 struct EditorActionArgs {
277- EditorActionArgs(EditorInteractive& base);
278+ explicit EditorActionArgs(EditorInteractive& base);
279
280 // TODO(sirver): This class does its own reference counting. This design is
281 // brittle and on a quick overview I have a feeling that it might not be
282
283=== modified file 'src/editor/tools/place_critter_tool.h'
284--- src/editor/tools/place_critter_tool.h 2017-01-25 18:55:59 +0000
285+++ src/editor/tools/place_critter_tool.h 2017-06-24 13:45:55 +0000
286@@ -25,7 +25,7 @@
287
288 /// Places critters on the map.
289 struct EditorPlaceCritterTool : public EditorTool, public MultiSelect {
290- EditorPlaceCritterTool(EditorDeleteCritterTool& tool) : EditorTool(tool, tool) {
291+ explicit EditorPlaceCritterTool(EditorDeleteCritterTool& tool) : EditorTool(tool, tool) {
292 }
293
294 int32_t handle_click_impl(const Widelands::World& world,
295
296=== modified file 'src/editor/tools/place_immovable_tool.h'
297--- src/editor/tools/place_immovable_tool.h 2017-01-25 18:55:59 +0000
298+++ src/editor/tools/place_immovable_tool.h 2017-06-24 13:45:55 +0000
299@@ -27,7 +27,7 @@
300 * This places immovables on the map
301 */
302 struct EditorPlaceImmovableTool : public EditorTool, public MultiSelect {
303- EditorPlaceImmovableTool(EditorDeleteImmovableTool& tool) : EditorTool(tool, tool) {
304+ explicit EditorPlaceImmovableTool(EditorDeleteImmovableTool& tool) : EditorTool(tool, tool) {
305 }
306
307 int32_t handle_click_impl(const Widelands::World& world,
308
309=== modified file 'src/editor/tools/set_port_space_tool.h'
310--- src/editor/tools/set_port_space_tool.h 2017-01-25 18:55:59 +0000
311+++ src/editor/tools/set_port_space_tool.h 2017-06-24 13:45:55 +0000
312@@ -29,7 +29,7 @@
313 /// Unsets a buildspace for ports.
314 class EditorUnsetPortSpaceTool : public EditorTool {
315 public:
316- EditorUnsetPortSpaceTool();
317+ explicit EditorUnsetPortSpaceTool();
318
319 int32_t handle_click_impl(const Widelands::World& world,
320 const Widelands::NodeAndTriangle<>& center,
321
322=== modified file 'src/editor/ui_menus/main_menu_load_map.h'
323--- src/editor/ui_menus/main_menu_load_map.h 2017-01-25 18:55:59 +0000
324+++ src/editor/ui_menus/main_menu_load_map.h 2017-06-24 13:45:55 +0000
325@@ -29,7 +29,7 @@
326 * Choose a filename and save your brand new created map
327 */
328 struct MainMenuLoadMap : public MainMenuLoadOrSaveMap {
329- MainMenuLoadMap(EditorInteractive& parent);
330+ explicit MainMenuLoadMap(EditorInteractive& parent);
331
332 protected:
333 void clicked_ok() override;
334
335=== modified file 'src/editor/ui_menus/main_menu_new_map.h'
336--- src/editor/ui_menus/main_menu_new_map.h 2017-01-25 18:55:59 +0000
337+++ src/editor/ui_menus/main_menu_new_map.h 2017-06-24 13:45:55 +0000
338@@ -35,7 +35,7 @@
339 * things like size, world ....
340 */
341 struct MainMenuNewMap : public UI::Window {
342- MainMenuNewMap(EditorInteractive&);
343+ explicit MainMenuNewMap(EditorInteractive&);
344
345 private:
346 EditorInteractive& eia();
347
348=== modified file 'src/editor/ui_menus/main_menu_random_map.h'
349--- src/editor/ui_menus/main_menu_random_map.h 2017-01-25 18:55:59 +0000
350+++ src/editor/ui_menus/main_menu_random_map.h 2017-06-24 13:45:55 +0000
351@@ -45,7 +45,7 @@
352 * things like size, world ....
353 */
354 struct MainMenuNewRandomMap : public UI::Window {
355- MainMenuNewRandomMap(EditorInteractive&);
356+ explicit MainMenuNewRandomMap(EditorInteractive&);
357
358 enum class ButtonId : uint8_t {
359 kNone,
360
361=== modified file 'src/editor/ui_menus/main_menu_save_map.h'
362--- src/editor/ui_menus/main_menu_save_map.h 2017-01-25 18:55:59 +0000
363+++ src/editor/ui_menus/main_menu_save_map.h 2017-06-24 13:45:55 +0000
364@@ -32,7 +32,7 @@
365 * Choose a filename and save your brand new created map
366 */
367 struct MainMenuSaveMap : public MainMenuLoadOrSaveMap {
368- MainMenuSaveMap(EditorInteractive& parent);
369+ explicit MainMenuSaveMap(EditorInteractive& parent);
370
371 protected:
372 // Sets the current dir and updates labels.
373
374=== modified file 'src/graphic/animation.cc'
375--- src/graphic/animation.cc 2017-06-20 08:19:29 +0000
376+++ src/graphic/animation.cc 2017-06-24 13:45:55 +0000
377@@ -61,7 +61,7 @@
378 public:
379 virtual ~NonPackedAnimation() {
380 }
381- NonPackedAnimation(const LuaTable& table);
382+ explicit NonPackedAnimation(const LuaTable& table);
383
384 // Implements Animation.
385 float height() const override;
386
387=== modified file 'src/graphic/font_handler1.cc'
388--- src/graphic/font_handler1.cc 2017-05-25 12:30:40 +0000
389+++ src/graphic/font_handler1.cc 2017-06-24 13:45:55 +0000
390@@ -58,7 +58,7 @@
391 // A transient cache for the generated rendered texts
392 class RenderCache : public TransientCache<RenderedText> {
393 public:
394- RenderCache(uint32_t max_number_of_rects)
395+ explicit RenderCache(uint32_t max_number_of_rects)
396 : TransientCache<RenderedText>(max_number_of_rects) {
397 }
398
399
400=== modified file 'src/graphic/gl/utils.cc'
401--- src/graphic/gl/utils.cc 2016-09-06 07:59:30 +0000
402+++ src/graphic/gl/utils.cc 2017-06-24 13:45:55 +0000
403@@ -81,7 +81,7 @@
404 // Thin wrapper around a Shader object to ensure proper cleanup.
405 class Shader {
406 public:
407- Shader(GLenum type);
408+ explicit Shader(GLenum type);
409 ~Shader();
410
411 GLuint object() const {
412
413=== modified file 'src/graphic/image_io.h'
414--- src/graphic/image_io.h 2017-01-25 18:55:59 +0000
415+++ src/graphic/image_io.h 2017-06-24 13:45:55 +0000
416@@ -32,7 +32,7 @@
417
418 class ImageNotFound : public WException {
419 public:
420- ImageNotFound(const std::string& fn) : wexception("Image not found: %s", fn.c_str()) {
421+ explicit ImageNotFound(const std::string& fn) : wexception("Image not found: %s", fn.c_str()) {
422 }
423 };
424
425
426=== modified file 'src/graphic/render_queue.cc'
427--- src/graphic/render_queue.cc 2017-05-19 06:40:44 +0000
428+++ src/graphic/render_queue.cc 2017-06-24 13:45:55 +0000
429@@ -120,7 +120,7 @@
430 // creation. Disables GL_SCISSOR_TEST at desctruction again.
431 class ScopedScissor {
432 public:
433- ScopedScissor(const Rectf& rect);
434+ explicit ScopedScissor(const Rectf& rect);
435 ~ScopedScissor();
436
437 private:
438
439=== modified file 'src/graphic/rendertarget.h'
440--- src/graphic/rendertarget.h 2017-05-14 04:38:39 +0000
441+++ src/graphic/rendertarget.h 2017-06-24 13:45:55 +0000
442@@ -50,7 +50,7 @@
443 // the old richtext renderer is gone.
444 class RenderTarget {
445 public:
446- RenderTarget(Surface*);
447+ explicit RenderTarget(Surface*);
448 void set_window(const Recti& rc, const Vector2i& ofs);
449 bool enter_window(const Recti& rc, Recti* previous, Vector2i* prevofs);
450
451
452=== modified file 'src/graphic/richtext.cc'
453--- src/graphic/richtext.cc 2017-05-14 04:38:39 +0000
454+++ src/graphic/richtext.cc 2017-06-24 13:45:55 +0000
455@@ -239,7 +239,7 @@
456 /// parts of a line onto the same text baseline).
457 std::vector<Elt> elements;
458
459- TextBuilder(RichTextImpl& impl)
460+ explicit TextBuilder(RichTextImpl& impl)
461 : rti(impl),
462 images_width(0),
463 images_height(0),
464
465=== modified file 'src/graphic/text/font_set.h'
466--- src/graphic/text/font_set.h 2017-01-25 18:55:59 +0000
467+++ src/graphic/text/font_set.h 2017-06-24 13:45:55 +0000
468@@ -37,7 +37,7 @@
469 static constexpr const char* kFallbackFont = "DejaVu/DejaVuSans.ttf";
470
471 /// Create a fontset from i18n/fonts.lua
472- FontSet(const std::string& fontset_name);
473+ explicit FontSet(const std::string& fontset_name);
474
475 // The fontset's name
476 const std::string& name() const;
477
478=== modified file 'src/graphic/text/rendered_text.h'
479--- src/graphic/text/rendered_text.h 2017-05-23 21:32:20 +0000
480+++ src/graphic/text/rendered_text.h 2017-06-24 13:45:55 +0000
481@@ -58,18 +58,18 @@
482
483 public:
484 /// RenderedRect will contain a background image that should be tiled
485- RenderedRect(const Recti& init_rect, const Image* init_image);
486+ explicit RenderedRect(const Recti& init_rect, const Image* init_image);
487
488 /// RenderedRect will contain a background color that should be tiled
489- RenderedRect(const Recti& init_rect, const RGBColor& color);
490+ explicit RenderedRect(const Recti& init_rect, const RGBColor& color);
491
492 /// RenderedRect will contain a normal image that is managed by a transient cache.
493 /// Use this if the image is managed by an instance of TextureCache.
494- RenderedRect(std::shared_ptr<const Image> init_image);
495+ explicit RenderedRect(std::shared_ptr<const Image> init_image);
496
497 /// RenderedRect will contain a normal image that is managed by a permanent cache.
498 /// Use this if the image is managed by g_gr->images().
499- RenderedRect(const Image* init_image);
500+ explicit RenderedRect(const Image* init_image);
501 ~RenderedRect() {
502 }
503
504
505=== modified file 'src/graphic/text/rt_errors.h'
506--- src/graphic/text/rt_errors.h 2017-01-25 18:55:59 +0000
507+++ src/graphic/text/rt_errors.h 2017-06-24 13:45:55 +0000
508@@ -28,7 +28,7 @@
509
510 class Exception : public std::exception {
511 public:
512- Exception(std::string msg) : std::exception(), msg_(msg) {
513+ explicit Exception(const std::string& msg) : std::exception(), msg_(msg) {
514 }
515 const char* what() const noexcept override {
516 return msg_.c_str();
517@@ -41,7 +41,7 @@
518 #define DEF_ERR(Name) \
519 class Name : public Exception { \
520 public: \
521- Name(std::string msg) : Exception(msg) { \
522+ explicit Name(const std::string& msg) : Exception(msg) { \
523 } \
524 };
525
526
527=== modified file 'src/graphic/text/rt_parse.h'
528--- src/graphic/text/rt_parse.h 2017-01-25 18:55:59 +0000
529+++ src/graphic/text/rt_parse.h 2017-06-24 13:45:55 +0000
530@@ -102,9 +102,9 @@
531 struct Child {
532 Child() : tag(nullptr), text() {
533 }
534- Child(Tag* t) : tag(t) {
535+ explicit Child(Tag* t) : tag(t) {
536 }
537- Child(std::string t) : tag(nullptr), text(t) {
538+ explicit Child(std::string t) : tag(nullptr), text(t) {
539 }
540 ~Child() {
541 if (tag)
542
543=== modified file 'src/graphic/text/rt_render.cc'
544--- src/graphic/text/rt_render.cc 2017-06-01 08:52:15 +0000
545+++ src/graphic/text/rt_render.cc 2017-06-24 13:45:55 +0000
546@@ -199,7 +199,7 @@
547
548 class RefMap : public IRefMap {
549 public:
550- RefMap(const std::vector<Reference>& refs) : refs_(refs) {
551+ explicit RefMap(const std::vector<Reference>& refs) : refs_(refs) {
552 }
553 std::string query(int16_t x, int16_t y) override {
554 // Should this linear algorithm proof to be too slow (doubtful), the
555@@ -221,7 +221,7 @@
556 FLOAT_RIGHT,
557 FLOAT_LEFT,
558 };
559- RenderNode(NodeStyle& ns)
560+ explicit RenderNode(NodeStyle& ns)
561 : floating_(NO_FLOAT), halign_(ns.halign), valign_(ns.valign), x_(0), y_(0) {
562 }
563 virtual ~RenderNode() {
564@@ -315,7 +315,7 @@
565
566 class Layout {
567 public:
568- Layout(std::vector<RenderNode*>& all) : h_(0), idx_(0), all_nodes_(all) {
569+ explicit Layout(std::vector<RenderNode*>& all) : h_(0), idx_(0), all_nodes_(all) {
570 }
571 virtual ~Layout() {
572 }
573@@ -668,7 +668,7 @@
574 */
575 class NewlineNode : public RenderNode {
576 public:
577- NewlineNode(NodeStyle& ns) : RenderNode(ns) {
578+ explicit NewlineNode(NodeStyle& ns) : RenderNode(ns) {
579 }
580
581 std::string debug_info() const override {
582@@ -776,7 +776,7 @@
583 */
584 class DivTagRenderNode : public RenderNode {
585 public:
586- DivTagRenderNode(NodeStyle& ns)
587+ explicit DivTagRenderNode(NodeStyle& ns)
588 : RenderNode(ns),
589 desired_width_(),
590 background_color_(0, 0, 0),
591
592=== modified file 'src/graphic/text/textstream.h'
593--- src/graphic/text/textstream.h 2017-01-25 18:55:59 +0000
594+++ src/graphic/text/textstream.h 2017-06-24 13:45:55 +0000
595@@ -28,7 +28,7 @@
596
597 class TextStream {
598 public:
599- TextStream(std::string text) : text_(text), line_(1), col_(0), pos_(0), end_(text.size()) {
600+ explicit TextStream(std::string text) : text_(text), line_(1), col_(0), pos_(0), end_(text.size()) {
601 }
602
603 size_t line() const {
604
605=== modified file 'src/graphic/text/texture_cache.h'
606--- src/graphic/text/texture_cache.h 2017-05-23 06:59:43 +0000
607+++ src/graphic/text/texture_cache.h 2017-06-24 13:45:55 +0000
608@@ -27,7 +27,7 @@
609
610 class TextureCache : public TransientCache<Image> {
611 public:
612- TextureCache(uint32_t max_size_in_bytes) : TransientCache<Image>(max_size_in_bytes) {
613+ explicit TextureCache(uint32_t max_size_in_bytes) : TransientCache<Image>(max_size_in_bytes) {
614 }
615
616 std::shared_ptr<const Image> insert(const std::string& hash,
617
618=== modified file 'src/graphic/text/transient_cache.h'
619--- src/graphic/text/transient_cache.h 2017-05-25 12:30:40 +0000
620+++ src/graphic/text/transient_cache.h 2017-06-24 13:45:55 +0000
621@@ -44,7 +44,7 @@
622 public:
623 /// Create a new cache in which the combined data size for all transient entries is always below
624 /// the 'max_size_in_arbitrary_unit'.
625- TransientCache(uint32_t max_size_in_arbitrary_unit);
626+ explicit TransientCache(uint32_t max_size_in_arbitrary_unit);
627 virtual ~TransientCache();
628
629 /// Deletes all entries in the cache, leaving it as if it were just created.
630
631=== modified file 'src/graphic/texture_atlas.h'
632--- src/graphic/texture_atlas.h 2017-01-25 18:55:59 +0000
633+++ src/graphic/texture_atlas.h 2017-06-24 13:45:55 +0000
634@@ -68,7 +68,7 @@
635
636 private:
637 struct Node {
638- Node(const Recti& init_r);
639+ explicit Node(const Recti& init_r);
640 void split(int w, int h);
641
642 bool used;
643
644=== modified file 'src/io/filesystem/disk_filesystem.cc'
645--- src/io/filesystem/disk_filesystem.cc 2017-01-25 18:55:59 +0000
646+++ src/io/filesystem/disk_filesystem.cc 2017-06-24 13:45:55 +0000
647@@ -53,7 +53,7 @@
648 bool exists_;
649 bool is_directory_;
650
651- FileSystemPath(const std::string& path) : std::string(path) {
652+ explicit FileSystemPath(const std::string& path) : std::string(path) {
653 struct stat st;
654
655 exists_ = (stat(c_str(), &st) != -1);
656@@ -450,7 +450,7 @@
657 namespace {
658
659 struct RealFSStreamRead : public StreamRead {
660- RealFSStreamRead(const std::string& fname) : file_(fopen(fname.c_str(), "rb")) {
661+ explicit RealFSStreamRead(const std::string& fname) : file_(fopen(fname.c_str(), "rb")) {
662 if (!file_)
663 throw wexception("could not open %s for reading", fname.c_str());
664 }
665@@ -487,7 +487,7 @@
666 namespace {
667
668 struct RealFSStreamWrite : public StreamWrite {
669- RealFSStreamWrite(const std::string& fname) : filename_(fname) {
670+ explicit RealFSStreamWrite(const std::string& fname) : filename_(fname) {
671 file_ = fopen(fname.c_str(), "wb");
672 if (!file_)
673 throw wexception("could not open %s for writing", fname.c_str());
674
675=== modified file 'src/io/filesystem/disk_filesystem.h'
676--- src/io/filesystem/disk_filesystem.h 2017-01-25 18:55:59 +0000
677+++ src/io/filesystem/disk_filesystem.h 2017-06-24 13:45:55 +0000
678@@ -28,7 +28,7 @@
679 // TODO(unknown): const correctness
680 class RealFSImpl : public FileSystem {
681 public:
682- RealFSImpl(const std::string& Directory);
683+ explicit RealFSImpl(const std::string& Directory);
684
685 std::set<std::string> list_directory(const std::string& path) override;
686
687
688=== modified file 'src/io/filesystem/zip_filesystem.h'
689--- src/io/filesystem/zip_filesystem.h 2017-01-25 18:55:59 +0000
690+++ src/io/filesystem/zip_filesystem.h 2017-06-24 13:45:55 +0000
691@@ -72,7 +72,7 @@
692 // through 'make_sub_file_system'.
693 class ZipFile {
694 public:
695- ZipFile(const std::string& zipfile);
696+ explicit ZipFile(const std::string& zipfile);
697
698 // Calls 'close()'.
699 ~ZipFile();
700
701=== modified file 'src/logic/cmd_calculate_statistics.h'
702--- src/logic/cmd_calculate_statistics.h 2017-01-25 18:55:59 +0000
703+++ src/logic/cmd_calculate_statistics.h 2017-06-24 13:45:55 +0000
704@@ -29,7 +29,7 @@
705 struct CmdCalculateStatistics : public GameLogicCommand {
706 CmdCalculateStatistics() : GameLogicCommand(0) {
707 } // For savegame loading
708- CmdCalculateStatistics(uint32_t const init_duetime) : GameLogicCommand(init_duetime) {
709+ explicit CmdCalculateStatistics(uint32_t const init_duetime) : GameLogicCommand(init_duetime) {
710 }
711
712 // Write these commands to a file (for savegames)
713
714=== modified file 'src/logic/cmd_queue.h'
715--- src/logic/cmd_queue.h 2017-05-20 22:42:49 +0000
716+++ src/logic/cmd_queue.h 2017-06-24 13:45:55 +0000
717@@ -69,7 +69,7 @@
718 * the same for all parallel simulation.
719 */
720 struct Command {
721- Command(const uint32_t init_duetime) : duetime_(init_duetime) {
722+ explicit Command(const uint32_t init_duetime) : duetime_(init_duetime) {
723 }
724 virtual ~Command();
725
726@@ -95,7 +95,7 @@
727 * for all instances of a game to ensure parallel simulation.
728 */
729 struct GameLogicCommand : public Command {
730- GameLogicCommand(uint32_t const init_duetime) : Command(init_duetime) {
731+ explicit GameLogicCommand(uint32_t const init_duetime) : Command(init_duetime) {
732 }
733
734 // Write these commands to a file (for savegames)
735@@ -130,7 +130,7 @@
736 };
737
738 public:
739- CmdQueue(Game&);
740+ explicit CmdQueue(Game&);
741 ~CmdQueue();
742
743 /// Add a command to the queue. Takes ownership.
744
745=== modified file 'src/logic/editor_game_base.h'
746--- src/logic/editor_game_base.h 2017-05-26 06:11:27 +0000
747+++ src/logic/editor_game_base.h 2017-06-24 13:45:55 +0000
748@@ -81,7 +81,7 @@
749 friend class FullscreenMenuLaunchGame;
750 friend struct GameClassPacket;
751
752- EditorGameBase(LuaInterface* lua);
753+ explicit EditorGameBase(LuaInterface* lua);
754 virtual ~EditorGameBase();
755
756 void set_map(Map*);
757
758=== modified file 'src/logic/findbob.h'
759--- src/logic/findbob.h 2017-01-25 18:55:59 +0000
760+++ src/logic/findbob.h 2017-06-24 13:45:55 +0000
761@@ -27,7 +27,7 @@
762 class Player;
763
764 struct FindBobAttribute : public FindBob {
765- FindBobAttribute(uint32_t const init_attrib) : attrib(init_attrib) {
766+ explicit FindBobAttribute(uint32_t const init_attrib) : attrib(init_attrib) {
767 }
768
769 bool accept(Bob*) const override;
770@@ -42,7 +42,7 @@
771 * if player is 0).
772 */
773 struct FindBobEnemySoldier : public FindBob {
774- FindBobEnemySoldier(Player* init_player) : player(init_player) {
775+ explicit FindBobEnemySoldier(Player* init_player) : player(init_player) {
776 }
777
778 bool accept(Bob*) const override;
779
780=== modified file 'src/logic/findimmovable.h'
781--- src/logic/findimmovable.h 2017-05-20 22:42:49 +0000
782+++ src/logic/findimmovable.h 2017-06-24 13:45:55 +0000
783@@ -50,7 +50,7 @@
784 int refcount;
785 };
786 template <typename T> struct Capsule : public BaseCapsule {
787- Capsule(const T& init_op) : op(init_op) {
788+ explicit Capsule(const T& init_op) : op(init_op) {
789 }
790 bool accept(const BaseImmovable& imm) const override {
791 return op.accept(imm);
792@@ -101,7 +101,7 @@
793 int32_t min, max;
794 };
795 struct FindImmovableType {
796- FindImmovableType(MapObjectType const init_type) : type(init_type) {
797+ explicit FindImmovableType(MapObjectType const init_type) : type(init_type) {
798 }
799
800 bool accept(const BaseImmovable&) const;
801@@ -110,7 +110,7 @@
802 MapObjectType type;
803 };
804 struct FindImmovableAttribute {
805- FindImmovableAttribute(uint32_t const init_attrib) : attrib(init_attrib) {
806+ explicit FindImmovableAttribute(uint32_t const init_attrib) : attrib(init_attrib) {
807 }
808
809 bool accept(const BaseImmovable&) const;
810@@ -125,7 +125,7 @@
811 bool accept(const BaseImmovable&) const;
812 };
813 struct FindImmovablePlayerMilitarySite {
814- FindImmovablePlayerMilitarySite(const Player& init_player) : player(init_player) {
815+ explicit FindImmovablePlayerMilitarySite(const Player& init_player) : player(init_player) {
816 }
817
818 bool accept(const BaseImmovable&) const;
819@@ -139,7 +139,7 @@
820 bool accept(const BaseImmovable&) const;
821 };
822 struct FindImmovableByDescr {
823- FindImmovableByDescr(const ImmovableDescr& init_descr) : descr(init_descr) {
824+ explicit FindImmovableByDescr(const ImmovableDescr& init_descr) : descr(init_descr) {
825 }
826
827 bool accept(const BaseImmovable&) const;
828@@ -147,7 +147,7 @@
829 const ImmovableDescr& descr;
830 };
831 struct FindFlagOf {
832- FindFlagOf(const FindImmovable& init_finder) : finder(init_finder) {
833+ explicit FindFlagOf(const FindImmovable& init_finder) : finder(init_finder) {
834 }
835
836 bool accept(const BaseImmovable&) const;
837
838=== modified file 'src/logic/map_objects/bob.cc'
839--- src/logic/map_objects/bob.cc 2017-06-20 08:17:02 +0000
840+++ src/logic/map_objects/bob.cc 2017-06-24 13:45:55 +0000
841@@ -472,7 +472,7 @@
842 };
843
844 struct CheckStepBlocked {
845- CheckStepBlocked(BlockedTracker& tracker) : tracker_(tracker) {
846+ explicit CheckStepBlocked(BlockedTracker& tracker) : tracker_(tracker) {
847 }
848
849 bool allowed(Map&, FCoords, FCoords end, int32_t, CheckStep::StepId) const {
850
851=== modified file 'src/logic/map_objects/bob.h'
852--- src/logic/map_objects/bob.h 2017-04-23 12:11:19 +0000
853+++ src/logic/map_objects/bob.h 2017-06-24 13:45:55 +0000
854@@ -201,7 +201,7 @@
855 * \see class Bob for in-depth explanation
856 */
857 struct State {
858- State(const Task* const the_task = nullptr)
859+ explicit State(const Task* const the_task = nullptr)
860 : task(the_task),
861 ivar1(0),
862 ivar2(0),
863@@ -349,7 +349,7 @@
864 }
865
866 protected:
867- Bob(const BobDescr& descr);
868+ explicit Bob(const BobDescr& descr);
869 virtual ~Bob();
870
871 private:
872
873=== modified file 'src/logic/map_objects/immovable.h'
874--- src/logic/map_objects/immovable.h 2017-04-23 12:11:19 +0000
875+++ src/logic/map_objects/immovable.h 2017-06-24 13:45:55 +0000
876@@ -81,7 +81,7 @@
877 BIG ///< big building
878 };
879
880- BaseImmovable(const MapObjectDescr&);
881+ explicit BaseImmovable(const MapObjectDescr&);
882
883 virtual int32_t get_size() const = 0;
884 virtual bool get_passable() const = 0;
885@@ -329,7 +329,7 @@
886 * also adjusted automatically.
887 */
888 struct PlayerImmovable : public BaseImmovable {
889- PlayerImmovable(const MapObjectDescr&);
890+ explicit PlayerImmovable(const MapObjectDescr&);
891 virtual ~PlayerImmovable();
892
893 Player* get_owner() const {
894
895=== modified file 'src/logic/map_objects/map_object.h'
896--- src/logic/map_objects/map_object.h 2017-05-20 22:42:49 +0000
897+++ src/logic/map_objects/map_object.h 2017-06-24 13:45:55 +0000
898@@ -253,7 +253,7 @@
899 virtual const Image* representative_image() const;
900
901 protected:
902- MapObject(MapObjectDescr const* descr);
903+ explicit MapObject(MapObjectDescr const* descr);
904 virtual ~MapObject() {
905 }
906
907
908=== modified file 'src/logic/map_objects/tribes/bill_of_materials.h'
909--- src/logic/map_objects/tribes/bill_of_materials.h 2017-01-25 18:55:59 +0000
910+++ src/logic/map_objects/tribes/bill_of_materials.h 2017-06-24 13:45:55 +0000
911@@ -30,7 +30,7 @@
912
913 // range structure for iterating ware range with index
914 struct WareRange {
915- WareRange(const BillOfMaterials& range) : i(0), current(range.begin()), end(range.end()) {
916+ explicit WareRange(const BillOfMaterials& range) : i(0), current(range.begin()), end(range.end()) {
917 }
918 WareRange& operator++() {
919 ++i;
920
921=== modified file 'src/logic/map_objects/tribes/building.h'
922--- src/logic/map_objects/tribes/building.h 2017-05-25 12:31:33 +0000
923+++ src/logic/map_objects/tribes/building.h 2017-06-24 13:45:55 +0000
924@@ -220,7 +220,7 @@
925 public:
926 enum class InfoStringFormat { kCensus, kStatistics, kTooltip };
927
928- Building(const BuildingDescr&);
929+ explicit Building(const BuildingDescr&);
930
931 void load_finish(EditorGameBase&) override;
932
933
934=== modified file 'src/logic/map_objects/tribes/carrier.h'
935--- src/logic/map_objects/tribes/carrier.h 2017-02-20 14:15:07 +0000
936+++ src/logic/map_objects/tribes/carrier.h 2017-06-24 13:45:55 +0000
937@@ -54,7 +54,7 @@
938
939 MO_DESCR(CarrierDescr)
940
941- Carrier(const CarrierDescr& carrier_descr) : Worker(carrier_descr), promised_pickup_to_(NOONE) {
942+ explicit Carrier(const CarrierDescr& carrier_descr) : Worker(carrier_descr), promised_pickup_to_(NOONE) {
943 }
944 virtual ~Carrier() {
945 }
946
947=== modified file 'src/logic/map_objects/tribes/constructionsite.h'
948--- src/logic/map_objects/tribes/constructionsite.h 2017-04-23 12:11:19 +0000
949+++ src/logic/map_objects/tribes/constructionsite.h 2017-06-24 13:45:55 +0000
950@@ -83,7 +83,7 @@
951 MO_DESCR(ConstructionSiteDescr)
952
953 public:
954- ConstructionSite(const ConstructionSiteDescr& descr);
955+ explicit ConstructionSite(const ConstructionSiteDescr& descr);
956
957 const ConstructionsiteInformation& get_info() {
958 return info_;
959
960=== modified file 'src/logic/map_objects/tribes/dismantlesite.h'
961--- src/logic/map_objects/tribes/dismantlesite.h 2017-04-23 12:11:19 +0000
962+++ src/logic/map_objects/tribes/dismantlesite.h 2017-06-24 13:45:55 +0000
963@@ -65,8 +65,8 @@
964 MO_DESCR(DismantleSiteDescr)
965
966 public:
967- DismantleSite(const DismantleSiteDescr& descr);
968- DismantleSite(const DismantleSiteDescr& descr,
969+ explicit DismantleSite(const DismantleSiteDescr& descr);
970+ explicit DismantleSite(const DismantleSiteDescr& descr,
971 EditorGameBase&,
972 Coords const,
973 Player&,
974
975=== modified file 'src/logic/map_objects/tribes/militarysite.h'
976--- src/logic/map_objects/tribes/militarysite.h 2017-05-20 22:42:49 +0000
977+++ src/logic/map_objects/tribes/militarysite.h 2017-06-24 13:45:55 +0000
978@@ -80,7 +80,7 @@
979 kPrefersHeroes,
980 };
981
982- MilitarySite(const MilitarySiteDescr&);
983+ explicit MilitarySite(const MilitarySiteDescr&);
984 virtual ~MilitarySite();
985
986 bool init(EditorGameBase&) override;
987
988=== modified file 'src/logic/map_objects/tribes/partially_finished_building.h'
989--- src/logic/map_objects/tribes/partially_finished_building.h 2017-04-23 12:11:19 +0000
990+++ src/logic/map_objects/tribes/partially_finished_building.h 2017-06-24 13:45:55 +0000
991@@ -39,7 +39,7 @@
992 friend struct MapBuildingPacket;
993
994 public:
995- PartiallyFinishedBuilding(const BuildingDescr& building_descr);
996+ explicit PartiallyFinishedBuilding(const BuildingDescr& building_descr);
997
998 virtual void set_building(const BuildingDescr&);
999
1000
1001=== modified file 'src/logic/map_objects/tribes/production_program.h'
1002--- src/logic/map_objects/tribes/production_program.h 2017-01-25 18:55:59 +0000
1003+++ src/logic/map_objects/tribes/production_program.h 2017-06-24 13:45:55 +0000
1004@@ -181,7 +181,7 @@
1005
1006 /// Tests whether the economy needs a ware of type ware_type.
1007 struct EconomyNeedsWare : public Condition {
1008- EconomyNeedsWare(const DescriptionIndex& i) : ware_type(i) {
1009+ explicit EconomyNeedsWare(const DescriptionIndex& i) : ware_type(i) {
1010 }
1011 bool evaluate(const ProductionSite&) const override;
1012 std::string description(const Tribes& tribes) const override;
1013@@ -193,7 +193,7 @@
1014
1015 /// Tests whether the economy needs a worker of type worker_type.
1016 struct EconomyNeedsWorker : public Condition {
1017- EconomyNeedsWorker(const DescriptionIndex& i) : worker_type(i) {
1018+ explicit EconomyNeedsWorker(const DescriptionIndex& i) : worker_type(i) {
1019 }
1020 bool evaluate(const ProductionSite&) const override;
1021 std::string description(const Tribes& tribes) const override;
1022@@ -303,7 +303,7 @@
1023 ///
1024 /// Blocks the execution of the program for the specified duration.
1025 struct ActSleep : public Action {
1026- ActSleep(char* parameters);
1027+ explicit ActSleep(char* parameters);
1028 void execute(Game&, ProductionSite&) const override;
1029
1030 private:
1031@@ -321,7 +321,7 @@
1032 ///
1033 /// Ends the program if the feature is not enabled.
1034 struct ActCheckMap : public Action {
1035- ActCheckMap(char* parameters);
1036+ explicit ActCheckMap(char* parameters);
1037 void execute(Game&, ProductionSite&) const override;
1038
1039 private:
1040@@ -460,7 +460,7 @@
1041 };
1042
1043 struct ActCheckSoldier : public Action {
1044- ActCheckSoldier(char* parameters);
1045+ explicit ActCheckSoldier(char* parameters);
1046 void execute(Game&, ProductionSite&) const override;
1047
1048 private:
1049@@ -469,7 +469,7 @@
1050 };
1051
1052 struct ActTrain : public Action {
1053- ActTrain(char* parameters);
1054+ explicit ActTrain(char* parameters);
1055 void execute(Game&, ProductionSite&) const override;
1056
1057 private:
1058@@ -493,7 +493,7 @@
1059 /// Plays the specified sound effect with the specified priority. Whether the
1060 /// sound effect is actually played is determined by the sound handler.
1061 struct ActPlaySound : public Action {
1062- ActPlaySound(char* parameters);
1063+ explicit ActPlaySound(char* parameters);
1064 void execute(Game&, ProductionSite&) const override;
1065
1066 private:
1067
1068=== modified file 'src/logic/map_objects/tribes/productionsite.h'
1069--- src/logic/map_objects/tribes/productionsite.h 2017-06-23 16:16:28 +0000
1070+++ src/logic/map_objects/tribes/productionsite.h 2017-06-24 13:45:55 +0000
1071@@ -162,7 +162,7 @@
1072 MO_DESCR(ProductionSiteDescr)
1073
1074 public:
1075- ProductionSite(const ProductionSiteDescr& descr);
1076+ explicit ProductionSite(const ProductionSiteDescr& descr);
1077 virtual ~ProductionSite();
1078
1079 void log_general_info(const EditorGameBase&) override;
1080
1081=== modified file 'src/logic/map_objects/tribes/requirements.h'
1082--- src/logic/map_objects/tribes/requirements.h 2017-01-25 18:55:59 +0000
1083+++ src/logic/map_objects/tribes/requirements.h 2017-06-24 13:45:55 +0000
1084@@ -58,7 +58,7 @@
1085 };
1086
1087 template <typename T> struct Capsule : public BaseCapsule {
1088- Capsule(const T& init_m) : m(init_m) {
1089+ explicit Capsule(const T& init_m) : m(init_m) {
1090 }
1091
1092 bool check(const MapObject& obj) const override {
1093
1094=== modified file 'src/logic/map_objects/tribes/ship.h'
1095--- src/logic/map_objects/tribes/ship.h 2017-04-23 12:11:19 +0000
1096+++ src/logic/map_objects/tribes/ship.h 2017-06-24 13:45:55 +0000
1097@@ -98,7 +98,7 @@
1098 struct Ship : Bob {
1099 MO_DESCR(ShipDescr)
1100
1101- Ship(const ShipDescr& descr);
1102+ explicit Ship(const ShipDescr& descr);
1103 virtual ~Ship();
1104
1105 // Returns the fleet the ship is a part of.
1106
1107=== modified file 'src/logic/map_objects/tribes/soldier.cc'
1108--- src/logic/map_objects/tribes/soldier.cc 2017-06-20 10:35:56 +0000
1109+++ src/logic/map_objects/tribes/soldier.cc 2017-06-24 13:45:55 +0000
1110@@ -649,7 +649,7 @@
1111 }
1112
1113 struct FindNodeOwned {
1114- FindNodeOwned(PlayerNumber owner) : owner_(owner) {
1115+ explicit FindNodeOwned(PlayerNumber owner) : owner_(owner) {
1116 }
1117 bool accept(const Map&, const FCoords& coords) const {
1118 return (coords.field->get_owned_by() == owner_);
1119
1120=== modified file 'src/logic/map_objects/tribes/soldier.h'
1121--- src/logic/map_objects/tribes/soldier.h 2017-05-20 22:42:49 +0000
1122+++ src/logic/map_objects/tribes/soldier.h 2017-06-24 13:45:55 +0000
1123@@ -112,7 +112,7 @@
1124 private:
1125 // Health, Attack, Defense and Evade values.
1126 struct BattleAttribute {
1127- BattleAttribute(std::unique_ptr<LuaTable> table);
1128+ explicit BattleAttribute(std::unique_ptr<LuaTable> table);
1129
1130 uint32_t base; // Base value
1131 uint32_t maximum; // Maximum value for randomizing attack values
1132@@ -173,7 +173,7 @@
1133 MO_DESCR(SoldierDescr)
1134
1135 public:
1136- Soldier(const SoldierDescr&);
1137+ explicit Soldier(const SoldierDescr&);
1138
1139 bool init(EditorGameBase&) override;
1140 void cleanup(EditorGameBase&) override;
1141
1142=== modified file 'src/logic/map_objects/tribes/trainingsite.h'
1143--- src/logic/map_objects/tribes/trainingsite.h 2017-04-23 12:11:19 +0000
1144+++ src/logic/map_objects/tribes/trainingsite.h 2017-06-24 13:45:55 +0000
1145@@ -167,7 +167,7 @@
1146 };
1147
1148 public:
1149- TrainingSite(const TrainingSiteDescr&);
1150+ explicit TrainingSite(const TrainingSiteDescr&);
1151
1152 bool init(EditorGameBase&) override;
1153 void cleanup(EditorGameBase&) override;
1154
1155=== modified file 'src/logic/map_objects/tribes/tribe_basic_info.h'
1156--- src/logic/map_objects/tribes/tribe_basic_info.h 2017-01-25 18:55:59 +0000
1157+++ src/logic/map_objects/tribes/tribe_basic_info.h 2017-06-24 13:45:55 +0000
1158@@ -42,7 +42,7 @@
1159 std::string tooltip;
1160 };
1161
1162- TribeBasicInfo(std::unique_ptr<LuaTable> table);
1163+ explicit TribeBasicInfo(std::unique_ptr<LuaTable> table);
1164
1165 /// Internal name to reference this tribe
1166 std::string name;
1167
1168=== modified file 'src/logic/map_objects/tribes/warehouse.h'
1169--- src/logic/map_objects/tribes/warehouse.h 2017-05-20 22:42:49 +0000
1170+++ src/logic/map_objects/tribes/warehouse.h 2017-06-24 13:45:55 +0000
1171@@ -127,7 +127,7 @@
1172 kCompatible
1173 };
1174
1175- Warehouse(const WarehouseDescr&);
1176+ explicit Warehouse(const WarehouseDescr&);
1177 virtual ~Warehouse();
1178
1179 void load_finish(EditorGameBase&) override;
1180@@ -244,7 +244,7 @@
1181 // A warehouse that conquers space can also be attacked.
1182 class AttackTarget : public Widelands::AttackTarget {
1183 public:
1184- AttackTarget(Warehouse* warehouse) : warehouse_(warehouse) {
1185+ explicit AttackTarget(Warehouse* warehouse) : warehouse_(warehouse) {
1186 }
1187
1188 bool can_be_attacked() const override;
1189
1190=== modified file 'src/logic/map_objects/tribes/worker.cc'
1191--- src/logic/map_objects/tribes/worker.cc 2017-06-20 08:17:02 +0000
1192+++ src/logic/map_objects/tribes/worker.cc 2017-06-24 13:45:55 +0000
1193@@ -462,7 +462,7 @@
1194 // fields, trees, rocks and such on triangles and keep the nodes
1195 // passable. See code structure issue #1096824.
1196 struct FindNodeSpace {
1197- FindNodeSpace(BaseImmovable* const ignoreimm) : ignoreimmovable(ignoreimm) {
1198+ explicit FindNodeSpace(BaseImmovable* const ignoreimm) : ignoreimmovable(ignoreimm) {
1199 }
1200
1201 bool accept(const Map& map, const FCoords& coords) const {
1202@@ -2213,7 +2213,7 @@
1203 }
1204
1205 struct FindFlagWithPlayersWarehouse {
1206- FindFlagWithPlayersWarehouse(const Player& owner) : owner_(owner) {
1207+ explicit FindFlagWithPlayersWarehouse(const Player& owner) : owner_(owner) {
1208 }
1209 bool accept(const BaseImmovable& imm) const {
1210 if (upcast(Flag const, flag, &imm))
1211
1212=== modified file 'src/logic/map_objects/tribes/worker.h'
1213--- src/logic/map_objects/tribes/worker.h 2017-04-25 08:05:09 +0000
1214+++ src/logic/map_objects/tribes/worker.h 2017-06-24 13:45:55 +0000
1215@@ -71,7 +71,7 @@
1216 };
1217
1218 public:
1219- Worker(const WorkerDescr&);
1220+ explicit Worker(const WorkerDescr&);
1221 virtual ~Worker();
1222
1223 Player& owner() const {
1224
1225=== modified file 'src/logic/map_objects/world/critter.h'
1226--- src/logic/map_objects/world/critter.h 2017-01-25 18:55:59 +0000
1227+++ src/logic/map_objects/world/critter.h 2017-06-24 13:45:55 +0000
1228@@ -67,7 +67,7 @@
1229 MO_DESCR(CritterDescr)
1230
1231 public:
1232- Critter(const CritterDescr&);
1233+ explicit Critter(const CritterDescr&);
1234
1235 void init_auto_task(Game&) override;
1236
1237
1238=== modified file 'src/logic/map_objects/world/critter_program.h'
1239--- src/logic/map_objects/world/critter_program.h 2017-01-25 18:55:59 +0000
1240+++ src/logic/map_objects/world/critter_program.h 2017-06-24 13:45:55 +0000
1241@@ -41,7 +41,7 @@
1242 };
1243
1244 struct CritterProgram : public BobProgramBase {
1245- CritterProgram(const std::string& name) : name_(name) {
1246+ explicit CritterProgram(const std::string& name) : name_(name) {
1247 }
1248 virtual ~CritterProgram() {
1249 }
1250
1251=== modified file 'src/logic/map_objects/world/editor_category.h'
1252--- src/logic/map_objects/world/editor_category.h 2017-01-25 18:55:59 +0000
1253+++ src/logic/map_objects/world/editor_category.h 2017-06-24 13:45:55 +0000
1254@@ -33,7 +33,7 @@
1255 /// distinction and not a logical one.
1256 class EditorCategory {
1257 public:
1258- EditorCategory(const LuaTable& table);
1259+ explicit EditorCategory(const LuaTable& table);
1260
1261 /// Internal name.
1262 const std::string& name() const;
1263
1264=== modified file 'src/logic/map_objects/world/map_gen.h'
1265--- src/logic/map_objects/world/map_gen.h 2017-01-25 18:55:59 +0000
1266+++ src/logic/map_objects/world/map_gen.h 2017-06-24 13:45:55 +0000
1267@@ -73,7 +73,7 @@
1268 };
1269
1270 struct MapGenBobCategory {
1271- MapGenBobCategory(const LuaTable& table);
1272+ explicit MapGenBobCategory(const LuaTable& table);
1273
1274 size_t num_immovables() const {
1275 return immovables_.size();
1276
1277=== modified file 'src/logic/map_objects/world/resource_description.h'
1278--- src/logic/map_objects/world/resource_description.h 2017-01-25 18:55:59 +0000
1279+++ src/logic/map_objects/world/resource_description.h 2017-06-24 13:45:55 +0000
1280@@ -37,7 +37,7 @@
1281 int upper_limit;
1282 };
1283
1284- ResourceDescription(const LuaTable& table);
1285+ explicit ResourceDescription(const LuaTable& table);
1286
1287 /// Returns the in engine name of this resource.
1288 const std::string& name() const;
1289
1290=== modified file 'src/logic/map_objects/world/terrain_description.h'
1291--- src/logic/map_objects/world/terrain_description.h 2017-01-25 18:55:59 +0000
1292+++ src/logic/map_objects/world/terrain_description.h 2017-06-24 13:45:55 +0000
1293@@ -53,7 +53,7 @@
1294 };
1295
1296 struct Type {
1297- Type(TerrainDescription::Is init_is);
1298+ explicit Type(TerrainDescription::Is init_is);
1299
1300 TerrainDescription::Is is;
1301 const char* descname;
1302
1303=== modified file 'src/logic/mapastar.h'
1304--- src/logic/mapastar.h 2017-01-25 18:55:59 +0000
1305+++ src/logic/mapastar.h 2017-06-24 13:45:55 +0000
1306@@ -27,7 +27,7 @@
1307 namespace Widelands {
1308
1309 struct MapAStarBase {
1310- MapAStarBase(Map& m) : map(m), pathfields(m.pathfieldmgr_->allocate()) {
1311+ explicit MapAStarBase(Map& m) : map(m), pathfields(m.pathfieldmgr_->allocate()) {
1312 }
1313
1314 bool empty() const {
1315@@ -49,7 +49,7 @@
1316 };
1317
1318 struct StepEvalAStar {
1319- StepEvalAStar(Coords target)
1320+ explicit StepEvalAStar(Coords target)
1321 : target_(target), estimator_bias_(0), conservative_(true), swim_(false) {
1322 }
1323
1324
1325=== modified file 'src/logic/objective.h'
1326--- src/logic/objective.h 2017-01-25 18:55:59 +0000
1327+++ src/logic/objective.h 2017-06-24 13:45:55 +0000
1328@@ -32,7 +32,7 @@
1329 // end a scenario successfully.
1330 class Objective {
1331 public:
1332- Objective(const std::string& init_name)
1333+ explicit Objective(const std::string& init_name)
1334 : name_(init_name),
1335 descname_(init_name),
1336 descr_(_("This objective has no description.")),
1337
1338=== modified file 'src/logic/pathfield.h'
1339--- src/logic/pathfield.h 2017-01-25 18:55:59 +0000
1340+++ src/logic/pathfield.h 2017-06-24 13:45:55 +0000
1341@@ -66,7 +66,7 @@
1342 std::unique_ptr<Pathfield[]> fields;
1343 uint16_t cycle;
1344
1345- Pathfields(uint32_t nrfields);
1346+ explicit Pathfields(uint32_t nrfields);
1347 };
1348
1349 /**
1350
1351=== modified file 'src/logic/playercommand.h'
1352--- src/logic/playercommand.h 2017-01-25 18:55:59 +0000
1353+++ src/logic/playercommand.h 2017-06-24 13:45:55 +0000
1354@@ -82,7 +82,7 @@
1355 : PlayerCommand(t, p), serial(pi.serial()), recurse(init_recurse) {
1356 }
1357
1358- CmdBulldoze(StreamRead&);
1359+ explicit CmdBulldoze(StreamRead&);
1360
1361 void write(FileWrite&, EditorGameBase&, MapObjectSaver&) override;
1362 void read(FileRead&, EditorGameBase&, MapObjectLoader&) override;
1363@@ -106,7 +106,7 @@
1364 : PlayerCommand(init_duetime, p), coords(c), bi(i) {
1365 }
1366
1367- CmdBuild(StreamRead&);
1368+ explicit CmdBuild(StreamRead&);
1369
1370 void write(FileWrite&, EditorGameBase&, MapObjectSaver&) override;
1371 void read(FileRead&, EditorGameBase&, MapObjectLoader&) override;
1372@@ -130,7 +130,7 @@
1373 : PlayerCommand(t, p), coords(c) {
1374 }
1375
1376- CmdBuildFlag(StreamRead&);
1377+ explicit CmdBuildFlag(StreamRead&);
1378
1379 void write(FileWrite&, EditorGameBase&, MapObjectSaver&) override;
1380 void read(FileRead&, EditorGameBase&, MapObjectLoader&) override;
1381@@ -150,7 +150,7 @@
1382 CmdBuildRoad() : PlayerCommand(), path(nullptr), start(), nsteps(0), steps(nullptr) {
1383 } // For savegame loading
1384 CmdBuildRoad(uint32_t, int32_t, Path&);
1385- CmdBuildRoad(StreamRead&);
1386+ explicit CmdBuildRoad(StreamRead&);
1387
1388 virtual ~CmdBuildRoad();
1389
1390@@ -185,7 +185,7 @@
1391 return QueueCommandTypes::kFlagAction;
1392 }
1393
1394- CmdFlagAction(StreamRead&);
1395+ explicit CmdFlagAction(StreamRead&);
1396
1397 void execute(Game&) override;
1398 void serialize(StreamWrite&) override;
1399@@ -208,7 +208,7 @@
1400 return QueueCommandTypes::kStopBuilding;
1401 }
1402
1403- CmdStartStopBuilding(StreamRead&);
1404+ explicit CmdStartStopBuilding(StreamRead&);
1405
1406 void execute(Game&) override;
1407 void serialize(StreamWrite&) override;
1408@@ -234,7 +234,7 @@
1409 return QueueCommandTypes::kMilitarysiteSetSoldierPreference;
1410 }
1411
1412- CmdMilitarySiteSetSoldierPreference(StreamRead&);
1413+ explicit CmdMilitarySiteSetSoldierPreference(StreamRead&);
1414
1415 void execute(Game&) override;
1416 void serialize(StreamWrite&) override;
1417@@ -257,7 +257,7 @@
1418 return QueueCommandTypes::kPortStartExpedition;
1419 }
1420
1421- CmdStartOrCancelExpedition(StreamRead&);
1422+ explicit CmdStartOrCancelExpedition(StreamRead&);
1423
1424 void execute(Game&) override;
1425 void serialize(StreamWrite&) override;
1426@@ -284,7 +284,7 @@
1427 return QueueCommandTypes::kEnhanceBuilding;
1428 }
1429
1430- CmdEnhanceBuilding(StreamRead&);
1431+ explicit CmdEnhanceBuilding(StreamRead&);
1432
1433 void execute(Game&) override;
1434 void serialize(StreamWrite&) override;
1435@@ -309,7 +309,7 @@
1436 return QueueCommandTypes::kDismantleBuilding;
1437 }
1438
1439- CmdDismantleBuilding(StreamRead&);
1440+ explicit CmdDismantleBuilding(StreamRead&);
1441
1442 void execute(Game&) override;
1443 void serialize(StreamWrite&) override;
1444@@ -333,7 +333,7 @@
1445 return QueueCommandTypes::kEvictWorker;
1446 }
1447
1448- CmdEvictWorker(StreamRead&);
1449+ explicit CmdEvictWorker(StreamRead&);
1450
1451 void execute(Game&) override;
1452 void serialize(StreamWrite&) override;
1453@@ -356,7 +356,7 @@
1454 return QueueCommandTypes::kShipScout;
1455 }
1456
1457- CmdShipScoutDirection(StreamRead&);
1458+ explicit CmdShipScoutDirection(StreamRead&);
1459
1460 void execute(Game&) override;
1461 void serialize(StreamWrite&) override;
1462@@ -380,7 +380,7 @@
1463 return QueueCommandTypes::kShipConstructPort;
1464 }
1465
1466- CmdShipConstructPort(StreamRead&);
1467+ explicit CmdShipConstructPort(StreamRead&);
1468
1469 void execute(Game&) override;
1470 void serialize(StreamWrite&) override;
1471@@ -407,7 +407,7 @@
1472 return QueueCommandTypes::kShipExplore;
1473 }
1474
1475- CmdShipExploreIsland(StreamRead&);
1476+ explicit CmdShipExploreIsland(StreamRead&);
1477
1478 void execute(Game&) override;
1479 void serialize(StreamWrite&) override;
1480@@ -430,7 +430,7 @@
1481 return QueueCommandTypes::kSinkShip;
1482 }
1483
1484- CmdShipSink(StreamRead&);
1485+ explicit CmdShipSink(StreamRead&);
1486
1487 void execute(Game&) override;
1488 void serialize(StreamWrite&) override;
1489@@ -453,7 +453,7 @@
1490 return QueueCommandTypes::kShipCancelExpedition;
1491 }
1492
1493- CmdShipCancelExpedition(StreamRead&);
1494+ explicit CmdShipCancelExpedition(StreamRead&);
1495
1496 void execute(Game&) override;
1497 void serialize(StreamWrite&) override;
1498@@ -481,7 +481,7 @@
1499 return QueueCommandTypes::kSetWarePriority;
1500 }
1501
1502- CmdSetWarePriority(StreamRead&);
1503+ explicit CmdSetWarePriority(StreamRead&);
1504
1505 void execute(Game&) override;
1506 void serialize(StreamWrite&) override;
1507@@ -511,7 +511,7 @@
1508 return QueueCommandTypes::kSetInputMaxFill;
1509 }
1510
1511- CmdSetInputMaxFill(StreamRead&);
1512+ explicit CmdSetInputMaxFill(StreamRead&);
1513
1514 void execute(Game&) override;
1515 void serialize(StreamWrite&) override;
1516@@ -535,7 +535,7 @@
1517 void write(FileWrite&, EditorGameBase&, MapObjectSaver&) override;
1518 void read(FileRead&, EditorGameBase&, MapObjectLoader&) override;
1519
1520- CmdChangeTargetQuantity(StreamRead&);
1521+ explicit CmdChangeTargetQuantity(StreamRead&);
1522
1523 void serialize(StreamWrite&) override;
1524
1525@@ -569,7 +569,7 @@
1526 return QueueCommandTypes::kSetWareTargetQuantity;
1527 }
1528
1529- CmdSetWareTargetQuantity(StreamRead&);
1530+ explicit CmdSetWareTargetQuantity(StreamRead&);
1531
1532 void execute(Game&) override;
1533 void serialize(StreamWrite&) override;
1534@@ -594,7 +594,7 @@
1535 return QueueCommandTypes::kResetWareTargetQuantity;
1536 }
1537
1538- CmdResetWareTargetQuantity(StreamRead&);
1539+ explicit CmdResetWareTargetQuantity(StreamRead&);
1540
1541 void execute(Game&) override;
1542 void serialize(StreamWrite&) override;
1543@@ -617,7 +617,7 @@
1544 return QueueCommandTypes::kSetWorkerTargetQuantity;
1545 }
1546
1547- CmdSetWorkerTargetQuantity(StreamRead&);
1548+ explicit CmdSetWorkerTargetQuantity(StreamRead&);
1549
1550 void execute(Game&) override;
1551 void serialize(StreamWrite&) override;
1552@@ -642,7 +642,7 @@
1553 return QueueCommandTypes::kResetWorkerTargetQuantity;
1554 }
1555
1556- CmdResetWorkerTargetQuantity(StreamRead&);
1557+ explicit CmdResetWorkerTargetQuantity(StreamRead&);
1558
1559 void execute(Game&) override;
1560 void serialize(StreamWrite&) override;
1561@@ -668,7 +668,7 @@
1562 return QueueCommandTypes::kChangeTrainingOptions;
1563 }
1564
1565- CmdChangeTrainingOptions(StreamRead&);
1566+ explicit CmdChangeTrainingOptions(StreamRead&);
1567
1568 void execute(Game&) override;
1569 void serialize(StreamWrite&) override;
1570@@ -694,7 +694,7 @@
1571 return QueueCommandTypes::kDropSoldier;
1572 }
1573
1574- CmdDropSoldier(StreamRead&);
1575+ explicit CmdDropSoldier(StreamRead&);
1576
1577 void execute(Game&) override;
1578 void serialize(StreamWrite&) override;
1579@@ -719,7 +719,7 @@
1580 return QueueCommandTypes::kChangeSoldierCapacity;
1581 }
1582
1583- CmdChangeSoldierCapacity(StreamRead&);
1584+ explicit CmdChangeSoldierCapacity(StreamRead&);
1585
1586 void execute(Game&) override;
1587 void serialize(StreamWrite&) override;
1588@@ -745,7 +745,7 @@
1589 return QueueCommandTypes::kEnemyFlagAction;
1590 }
1591
1592- CmdEnemyFlagAction(StreamRead&);
1593+ explicit CmdEnemyFlagAction(StreamRead&);
1594
1595 void execute(Game&) override;
1596 void serialize(StreamWrite&) override;
1597@@ -766,7 +766,7 @@
1598 void write(FileWrite&, EditorGameBase&, MapObjectSaver&) override;
1599 void read(FileRead&, EditorGameBase&, MapObjectLoader&) override;
1600
1601- PlayerMessageCommand(StreamRead&);
1602+ explicit PlayerMessageCommand(StreamRead&);
1603
1604 MessageId message_id() const {
1605 return message_id_;
1606@@ -787,7 +787,7 @@
1607 return QueueCommandTypes::kMessageSetStatusRead;
1608 }
1609
1610- CmdMessageSetStatusRead(StreamRead& des) : PlayerMessageCommand(des) {
1611+ explicit CmdMessageSetStatusRead(StreamRead& des) : PlayerMessageCommand(des) {
1612 }
1613
1614 void execute(Game&) override;
1615@@ -805,7 +805,7 @@
1616 return QueueCommandTypes::kMessageSetStatusArchived;
1617 }
1618
1619- CmdMessageSetStatusArchived(StreamRead& des) : PlayerMessageCommand(des) {
1620+ explicit CmdMessageSetStatusArchived(StreamRead& des) : PlayerMessageCommand(des) {
1621 }
1622
1623 void execute(Game&) override;
1624@@ -830,7 +830,7 @@
1625 void execute(Game& game) override;
1626
1627 // Network (de-)serialization
1628- CmdSetStockPolicy(StreamRead& des);
1629+ explicit CmdSetStockPolicy(StreamRead& des);
1630 void serialize(StreamWrite& ser) override;
1631
1632 // Savegame functions
1633
1634=== modified file 'src/logic/playersmanager.h'
1635--- src/logic/playersmanager.h 2017-06-05 07:33:18 +0000
1636+++ src/logic/playersmanager.h 2017-06-24 13:45:55 +0000
1637@@ -51,7 +51,7 @@
1638
1639 class PlayersManager {
1640 public:
1641- PlayersManager(EditorGameBase& egbase);
1642+ explicit PlayersManager(EditorGameBase& egbase);
1643 virtual ~PlayersManager();
1644
1645 void cleanup();
1646
1647=== modified file 'src/logic/replay.cc'
1648--- src/logic/replay.cc 2017-01-25 18:55:59 +0000
1649+++ src/logic/replay.cc 2017-06-24 13:45:55 +0000
1650@@ -185,7 +185,7 @@
1651 */
1652 class CmdReplaySyncWrite : public Command {
1653 public:
1654- CmdReplaySyncWrite(const uint32_t init_duetime) : Command(init_duetime) {
1655+ explicit CmdReplaySyncWrite(const uint32_t init_duetime) : Command(init_duetime) {
1656 }
1657
1658 QueueCommandTypes id() const override {
1659
1660=== modified file 'src/logic/replay_game_controller.h'
1661--- src/logic/replay_game_controller.h 2017-01-25 18:55:59 +0000
1662+++ src/logic/replay_game_controller.h 2017-06-24 13:45:55 +0000
1663@@ -46,7 +46,7 @@
1664
1665 private:
1666 struct CmdReplayEnd : public Widelands::Command {
1667- CmdReplayEnd(uint32_t const init_duetime) : Widelands::Command(init_duetime) {
1668+ explicit CmdReplayEnd(uint32_t const init_duetime) : Widelands::Command(init_duetime) {
1669 }
1670 virtual void execute(Widelands::Game& game);
1671 virtual Widelands::QueueCommandTypes id() const;
1672
1673=== modified file 'src/logic/widelands_geometry_io.h'
1674--- src/logic/widelands_geometry_io.h 2017-01-25 18:55:59 +0000
1675+++ src/logic/widelands_geometry_io.h 2017-06-24 13:45:55 +0000
1676@@ -34,7 +34,7 @@
1677 };
1678
1679 struct DirectionInvalid : public FileRead::DataError {
1680- DirectionInvalid(Direction const D)
1681+ explicit DirectionInvalid(Direction const D)
1682 : DataError("direction is %u but must be one of {0 (idle), 1 (northeast), 2 "
1683 "(east), 3 (southeast), 4 (southwest), 5 (west), 6 (northwest)}",
1684 D),
1685
1686=== modified file 'src/map_io/map_players_view_packet.cc'
1687--- src/map_io/map_players_view_packet.cc 2017-01-25 18:55:59 +0000
1688+++ src/map_io/map_players_view_packet.cc 2017-06-24 13:45:55 +0000
1689@@ -168,7 +168,7 @@
1690
1691 // Errors for the Read* functions.
1692 struct TribeImmovableNonexistent : public FileRead::DataError {
1693- TribeImmovableNonexistent(const std::string& Name)
1694+ explicit TribeImmovableNonexistent(const std::string& Name)
1695 : DataError("immovable type \"%s\" does not seem to be a tribe immovable", Name.c_str()),
1696 name(Name) {
1697 }
1698@@ -176,13 +176,13 @@
1699 std::string name;
1700 };
1701 struct WorldImmovableNonexistent : public FileRead::DataError {
1702- WorldImmovableNonexistent(char const* const Name)
1703+ explicit WorldImmovableNonexistent(char const* const Name)
1704 : DataError("world does not define immovable type \"%s\"", Name), name(Name) {
1705 }
1706 char const* const name;
1707 };
1708 struct BuildingNonexistent : public FileRead::DataError {
1709- BuildingNonexistent(char const* const Name)
1710+ explicit BuildingNonexistent(char const* const Name)
1711 : DataError("tribes do not define building type \"%s\"", Name), name(Name) {
1712 }
1713 char const* const name;
1714
1715=== modified file 'src/map_io/world_legacy_lookup_table.cc'
1716--- src/map_io/world_legacy_lookup_table.cc 2017-02-18 14:03:02 +0000
1717+++ src/map_io/world_legacy_lookup_table.cc 2017-06-24 13:45:55 +0000
1718@@ -127,7 +127,7 @@
1719
1720 class OneWorldLegacyLookupTable : public WorldLegacyLookupTable {
1721 public:
1722- OneWorldLegacyLookupTable(const std::string& old_world_name);
1723+ explicit OneWorldLegacyLookupTable(const std::string& old_world_name);
1724
1725 // Implements OneWorldLegacyLookupTable.
1726 std::string lookup_resource(const std::string& resource) const override;
1727
1728=== modified file 'src/network/gamehost.cc'
1729--- src/network/gamehost.cc 2017-06-23 08:33:03 +0000
1730+++ src/network/gamehost.cc 2017-06-24 13:45:55 +0000
1731@@ -64,7 +64,7 @@
1732 #include "wui/interactive_spectator.h"
1733
1734 struct HostGameSettingsProvider : public GameSettingsProvider {
1735- HostGameSettingsProvider(GameHost* const init_host) : host_(init_host) {
1736+ explicit HostGameSettingsProvider(GameHost* const init_host) : host_(init_host) {
1737 }
1738 ~HostGameSettingsProvider() {
1739 }
1740@@ -278,7 +278,7 @@
1741 };
1742
1743 struct HostChatProvider : public ChatProvider {
1744- HostChatProvider(GameHost* const init_host) : h(init_host), kickClient(0) {
1745+ explicit HostChatProvider(GameHost* const init_host) : h(init_host), kickClient(0) {
1746 }
1747
1748 void send(const std::string& msg) override {
1749@@ -527,7 +527,7 @@
1750 Md5Checksum syncreport;
1751 bool syncreport_arrived;
1752
1753- GameHostImpl(GameHost* const h)
1754+ explicit GameHostImpl(GameHost* const h)
1755 : localdesiredspeed(0),
1756 chat(h),
1757 hp(h),
1758
1759=== modified file 'src/network/netclient.h'
1760--- src/network/netclient.h 2017-06-10 16:36:29 +0000
1761+++ src/network/netclient.h 2017-06-24 13:45:55 +0000
1762@@ -79,7 +79,7 @@
1763 * If the connection attempt failed, is_connected() will return \c false.
1764 * \param host The host to connect to.
1765 */
1766- NetClient(const NetAddress& host);
1767+ explicit NetClient(const NetAddress& host);
1768
1769 /// An io_service needed by boost.asio. Primarily needed for asynchronous operations.
1770 boost::asio::io_service io_service_;
1771
1772=== modified file 'src/network/nethost.h'
1773--- src/network/nethost.h 2017-06-10 16:36:29 +0000
1774+++ src/network/nethost.h 2017-06-24 13:45:55 +0000
1775@@ -105,7 +105,7 @@
1776 * If it fails, is_listening() will return \c false.
1777 * \param port The port to listen on.
1778 */
1779- NetHost(const uint16_t port);
1780+ explicit NetHost(uint16_t port);
1781
1782 bool open_acceptor(boost::asio::ip::tcp::acceptor* acceptor,
1783 const boost::asio::ip::tcp::endpoint& endpoint);
1784@@ -119,7 +119,7 @@
1785 * \param sock The socket to listen on. The socket is moved by this
1786 * constructor so the given socket is no longer valid.
1787 */
1788- Client(boost::asio::ip::tcp::socket&& sock);
1789+ explicit Client(boost::asio::ip::tcp::socket&& sock);
1790
1791 /// The socket to send/receive with.
1792 boost::asio::ip::tcp::socket socket;
1793
1794=== modified file 'src/network/network_lan_promotion.h'
1795--- src/network/network_lan_promotion.h 2017-06-10 16:36:29 +0000
1796+++ src/network/network_lan_promotion.h 2017-06-24 13:45:55 +0000
1797@@ -59,7 +59,7 @@
1798 * When both fail, report_network_error() is called.
1799 * \param port The port to listen on.
1800 */
1801- LanBase(uint16_t port);
1802+ explicit LanBase(uint16_t port);
1803
1804 ~LanBase();
1805
1806
1807=== modified file 'src/network/network_player_settings_backend.h'
1808--- src/network/network_player_settings_backend.h 2017-02-13 13:06:25 +0000
1809+++ src/network/network_player_settings_backend.h 2017-06-24 13:45:55 +0000
1810@@ -25,7 +25,7 @@
1811
1812 struct NetworkPlayerSettingsBackend {
1813
1814- NetworkPlayerSettingsBackend(GameSettingsProvider* const settings) : s(settings) {
1815+ explicit NetworkPlayerSettingsBackend(GameSettingsProvider* const settings) : s(settings) {
1816 for (uint8_t i = 0; i < kMaxPlayers; ++i)
1817 shared_in_tribe[i] = std::string();
1818 }
1819
1820=== modified file 'src/notifications/test/notifications_test.cc'
1821--- src/notifications/test/notifications_test.cc 2017-06-20 10:42:00 +0000
1822+++ src/notifications/test/notifications_test.cc 2017-06-24 13:45:55 +0000
1823@@ -32,7 +32,7 @@
1824 struct SimpleNote {
1825 CAN_BE_SENT_AS_NOTE(100)
1826
1827- SimpleNote(const std::string& init_text) : text(init_text) {
1828+ explicit SimpleNote(const std::string& init_text) : text(init_text) {
1829 }
1830
1831 std::string text;
1832
1833=== modified file 'src/profile/profile.h'
1834--- src/profile/profile.h 2017-05-13 11:25:24 +0000
1835+++ src/profile/profile.h 2017-06-24 13:45:55 +0000
1836@@ -182,11 +182,11 @@
1837 public:
1838 enum { err_ignore = 0, err_log, err_throw };
1839
1840- Profile(int32_t error_level = err_throw);
1841- Profile(char const* filename,
1842+ explicit Profile(int32_t error_level = err_throw);
1843+ explicit Profile(char const* filename,
1844 char const* global_section = nullptr,
1845 int32_t error_level = err_throw);
1846- Profile(char const* filename,
1847+ explicit Profile(char const* filename,
1848 char const* global_section,
1849 const std::string& textdomain,
1850 int32_t error_level = err_throw);
1851
1852=== modified file 'src/scripting/logic.h'
1853--- src/scripting/logic.h 2017-01-25 18:55:59 +0000
1854+++ src/scripting/logic.h 2017-06-24 13:45:55 +0000
1855@@ -31,7 +31,7 @@
1856
1857 class LuaEditorInterface : public LuaInterface {
1858 public:
1859- LuaEditorInterface(Widelands::EditorGameBase* g);
1860+ explicit LuaEditorInterface(Widelands::EditorGameBase* g);
1861 virtual ~LuaEditorInterface();
1862
1863 std::unique_ptr<LuaTable> run_script(const std::string& script) override;
1864@@ -42,7 +42,7 @@
1865
1866 class LuaGameInterface : public LuaInterface {
1867 public:
1868- LuaGameInterface(Widelands::Game* g);
1869+ explicit LuaGameInterface(Widelands::Game* g);
1870 virtual ~LuaGameInterface();
1871
1872 // Returns a given hook if one is defined, otherwise returns 0
1873
1874=== modified file 'src/scripting/lua_bases.h'
1875--- src/scripting/lua_bases.h 2017-01-25 18:55:59 +0000
1876+++ src/scripting/lua_bases.h 2017-06-24 13:45:55 +0000
1877@@ -43,7 +43,7 @@
1878
1879 LuaEditorGameBase() {
1880 }
1881- LuaEditorGameBase(lua_State* L) {
1882+ explicit LuaEditorGameBase(lua_State* L) {
1883 report_error(L, "Cannot instantiate a 'EditorGameBase' directly!");
1884 }
1885 virtual ~LuaEditorGameBase() {
1886@@ -83,10 +83,10 @@
1887
1888 LuaPlayerBase() : player_number_(NONE) {
1889 }
1890- LuaPlayerBase(lua_State* L) : player_number_(NONE) {
1891+ explicit LuaPlayerBase(lua_State* L) : player_number_(NONE) {
1892 report_error(L, "Cannot instantiate a 'PlayerBase' directly!");
1893 }
1894- LuaPlayerBase(Widelands::PlayerNumber n) {
1895+ explicit LuaPlayerBase(Widelands::PlayerNumber n) {
1896 player_number_ = n;
1897 }
1898 virtual ~LuaPlayerBase() {
1899
1900=== modified file 'src/scripting/lua_coroutine.h'
1901--- src/scripting/lua_coroutine.h 2017-01-25 18:55:59 +0000
1902+++ src/scripting/lua_coroutine.h 2017-06-24 13:45:55 +0000
1903@@ -47,7 +47,7 @@
1904 // and can be deleted.
1905 enum { DONE = 0, YIELDED = LUA_YIELD };
1906
1907- LuaCoroutine(lua_State* L);
1908+ explicit LuaCoroutine(lua_State* L);
1909 virtual ~LuaCoroutine();
1910
1911 // Returns either 'DONE' or 'YIELDED'.
1912
1913=== modified file 'src/scripting/lua_editor.h'
1914--- src/scripting/lua_editor.h 2017-01-25 18:55:59 +0000
1915+++ src/scripting/lua_editor.h 2017-06-24 13:45:55 +0000
1916@@ -37,9 +37,9 @@
1917
1918 LuaPlayer() : LuaBases::LuaPlayerBase() {
1919 }
1920- LuaPlayer(Widelands::PlayerNumber n) : LuaBases::LuaPlayerBase(n) {
1921+ explicit LuaPlayer(Widelands::PlayerNumber n) : LuaBases::LuaPlayerBase(n) {
1922 }
1923- LuaPlayer(lua_State* L) {
1924+ explicit LuaPlayer(lua_State* L) {
1925 report_error(L, "Cannot instantiate a 'Player' directly!");
1926 }
1927
1928
1929=== modified file 'src/scripting/lua_errors.h'
1930--- src/scripting/lua_errors.h 2017-01-25 18:55:59 +0000
1931+++ src/scripting/lua_errors.h 2017-06-24 13:45:55 +0000
1932@@ -26,12 +26,12 @@
1933
1934 class LuaError : public WException {
1935 public:
1936- LuaError(const std::string& reason);
1937+ explicit LuaError(const std::string& reason);
1938 };
1939
1940 class LuaScriptNotExistingError : public LuaError {
1941 public:
1942- LuaScriptNotExistingError(const std::string& name);
1943+ explicit LuaScriptNotExistingError(const std::string& name);
1944 };
1945
1946 #endif // end of include guard: WL_SCRIPTING_LUA_ERRORS_H
1947
1948=== modified file 'src/scripting/lua_game.h'
1949--- src/scripting/lua_game.h 2017-01-25 18:55:59 +0000
1950+++ src/scripting/lua_game.h 2017-06-24 13:45:55 +0000
1951@@ -56,9 +56,9 @@
1952
1953 LuaPlayer() : LuaBases::LuaPlayerBase() {
1954 }
1955- LuaPlayer(Widelands::PlayerNumber n) : LuaBases::LuaPlayerBase(n) {
1956+ explicit LuaPlayer(Widelands::PlayerNumber n) : LuaBases::LuaPlayerBase(n) {
1957 }
1958- LuaPlayer(lua_State* L) {
1959+ explicit LuaPlayer(lua_State* L) {
1960 report_error(L, "Cannot instantiate a 'Player' directly!");
1961 }
1962
1963@@ -117,10 +117,10 @@
1964 virtual ~LuaObjective() {
1965 }
1966
1967- LuaObjective(const Widelands::Objective& n);
1968+ explicit LuaObjective(const Widelands::Objective& n);
1969 LuaObjective() : name_("") {
1970 }
1971- LuaObjective(lua_State* L) {
1972+ explicit LuaObjective(lua_State* L) {
1973 report_error(L, "Cannot instantiate a '%s' directly!", className);
1974 }
1975
1976@@ -161,10 +161,10 @@
1977 virtual ~LuaMessage() {
1978 }
1979
1980- LuaMessage(uint8_t, Widelands::MessageId);
1981+ explicit LuaMessage(uint8_t, Widelands::MessageId);
1982 LuaMessage() : player_number_(0), message_id_(0) {
1983 }
1984- LuaMessage(lua_State* L) {
1985+ explicit LuaMessage(lua_State* L) {
1986 report_error(L, "Cannot instantiate a '%s' directly!", className);
1987 }
1988
1989
1990=== modified file 'src/scripting/lua_map.h'
1991--- src/scripting/lua_map.h 2017-03-26 11:05:06 +0000
1992+++ src/scripting/lua_map.h 2017-06-24 13:45:55 +0000
1993@@ -75,7 +75,7 @@
1994
1995 LuaMap() {
1996 }
1997- LuaMap(lua_State* L) {
1998+ explicit LuaMap(lua_State* L) {
1999 report_error(L, "Cannot instantiate a 'Map' directly!");
2000 }
2001
2002@@ -111,9 +111,9 @@
2003
2004 LuaTribeDescription() : tribedescr_(nullptr) {
2005 }
2006- LuaTribeDescription(const Widelands::TribeDescr* const tribedescr) : tribedescr_(tribedescr) {
2007+ explicit LuaTribeDescription(const Widelands::TribeDescr* const tribedescr) : tribedescr_(tribedescr) {
2008 }
2009- LuaTribeDescription(lua_State* L) : tribedescr_(nullptr) {
2010+ explicit LuaTribeDescription(lua_State* L) : tribedescr_(nullptr) {
2011 report_error(L, "Cannot instantiate a 'LuaTribeDescription' directly!");
2012 }
2013
2014@@ -169,10 +169,10 @@
2015
2016 LuaMapObjectDescription() : mapobjectdescr_(nullptr) {
2017 }
2018- LuaMapObjectDescription(const Widelands::MapObjectDescr* const mapobjectdescr)
2019+ explicit LuaMapObjectDescription(const Widelands::MapObjectDescr* const mapobjectdescr)
2020 : mapobjectdescr_(mapobjectdescr) {
2021 }
2022- LuaMapObjectDescription(lua_State* L) : mapobjectdescr_(nullptr) {
2023+ explicit LuaMapObjectDescription(lua_State* L) : mapobjectdescr_(nullptr) {
2024 report_error(L, "Cannot instantiate a 'MapObjectDescription' directly!");
2025 }
2026
2027@@ -223,10 +223,10 @@
2028
2029 LuaImmovableDescription() {
2030 }
2031- LuaImmovableDescription(const Widelands::ImmovableDescr* const immovabledescr)
2032+ explicit LuaImmovableDescription(const Widelands::ImmovableDescr* const immovabledescr)
2033 : LuaMapObjectDescription(immovabledescr) {
2034 }
2035- LuaImmovableDescription(lua_State* L) : LuaMapObjectDescription(L) {
2036+ explicit LuaImmovableDescription(lua_State* L) : LuaMapObjectDescription(L) {
2037 }
2038
2039 void __persist(lua_State* L) override;
2040@@ -265,10 +265,10 @@
2041
2042 LuaBuildingDescription() {
2043 }
2044- LuaBuildingDescription(const Widelands::BuildingDescr* const buildingdescr)
2045+ explicit LuaBuildingDescription(const Widelands::BuildingDescr* const buildingdescr)
2046 : LuaMapObjectDescription(buildingdescr) {
2047 }
2048- LuaBuildingDescription(lua_State* L) : LuaMapObjectDescription(L) {
2049+ explicit LuaBuildingDescription(lua_State* L) : LuaMapObjectDescription(L) {
2050 }
2051
2052 void __persist(lua_State* L) override;
2053@@ -316,11 +316,11 @@
2054
2055 LuaConstructionSiteDescription() {
2056 }
2057- LuaConstructionSiteDescription(
2058+ explicit LuaConstructionSiteDescription(
2059 const Widelands::ConstructionSiteDescr* const constructionsitedescr)
2060 : LuaBuildingDescription(constructionsitedescr) {
2061 }
2062- LuaConstructionSiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2063+ explicit LuaConstructionSiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2064 }
2065
2066 private:
2067@@ -336,10 +336,10 @@
2068
2069 LuaDismantleSiteDescription() {
2070 }
2071- LuaDismantleSiteDescription(const Widelands::DismantleSiteDescr* const dismantlesitedescr)
2072+ explicit LuaDismantleSiteDescription(const Widelands::DismantleSiteDescr* const dismantlesitedescr)
2073 : LuaBuildingDescription(dismantlesitedescr) {
2074 }
2075- LuaDismantleSiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2076+ explicit LuaDismantleSiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2077 }
2078
2079 private:
2080@@ -355,10 +355,10 @@
2081
2082 LuaProductionSiteDescription() {
2083 }
2084- LuaProductionSiteDescription(const Widelands::ProductionSiteDescr* const productionsitedescr)
2085+ explicit LuaProductionSiteDescription(const Widelands::ProductionSiteDescr* const productionsitedescr)
2086 : LuaBuildingDescription(productionsitedescr) {
2087 }
2088- LuaProductionSiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2089+ explicit LuaProductionSiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2090 }
2091
2092 /*
2093@@ -395,10 +395,10 @@
2094
2095 LuaMilitarySiteDescription() {
2096 }
2097- LuaMilitarySiteDescription(const Widelands::MilitarySiteDescr* const militarysitedescr)
2098+ explicit LuaMilitarySiteDescription(const Widelands::MilitarySiteDescr* const militarysitedescr)
2099 : LuaBuildingDescription(militarysitedescr) {
2100 }
2101- LuaMilitarySiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2102+ explicit LuaMilitarySiteDescription(lua_State* L) : LuaBuildingDescription(L) {
2103 }
2104
2105 /*
2106@@ -428,10 +428,10 @@
2107
2108 LuaTrainingSiteDescription() {
2109 }
2110- LuaTrainingSiteDescription(const Widelands::TrainingSiteDescr* const trainingsitedescr)
2111+ explicit LuaTrainingSiteDescription(const Widelands::TrainingSiteDescr* const trainingsitedescr)
2112 : LuaProductionSiteDescription(trainingsitedescr) {
2113 }
2114- LuaTrainingSiteDescription(lua_State* L) : LuaProductionSiteDescription(L) {
2115+ explicit LuaTrainingSiteDescription(lua_State* L) : LuaProductionSiteDescription(L) {
2116 }
2117
2118 /*
2119@@ -476,10 +476,10 @@
2120
2121 LuaWarehouseDescription() {
2122 }
2123- LuaWarehouseDescription(const Widelands::WarehouseDescr* const warehousedescr)
2124+ explicit LuaWarehouseDescription(const Widelands::WarehouseDescr* const warehousedescr)
2125 : LuaBuildingDescription(warehousedescr) {
2126 }
2127- LuaWarehouseDescription(lua_State* L) : LuaBuildingDescription(L) {
2128+ explicit LuaWarehouseDescription(lua_State* L) : LuaBuildingDescription(L) {
2129 }
2130
2131 /*
2132@@ -508,10 +508,10 @@
2133
2134 LuaWareDescription() {
2135 }
2136- LuaWareDescription(const Widelands::WareDescr* const waredescr)
2137+ explicit LuaWareDescription(const Widelands::WareDescr* const waredescr)
2138 : LuaMapObjectDescription(waredescr) {
2139 }
2140- LuaWareDescription(lua_State* L) : LuaMapObjectDescription(L) {
2141+ explicit LuaWareDescription(lua_State* L) : LuaMapObjectDescription(L) {
2142 }
2143
2144 void __persist(lua_State* L) override;
2145@@ -546,10 +546,10 @@
2146
2147 LuaWorkerDescription() {
2148 }
2149- LuaWorkerDescription(const Widelands::WorkerDescr* const workerdescr)
2150+ explicit LuaWorkerDescription(const Widelands::WorkerDescr* const workerdescr)
2151 : LuaMapObjectDescription(workerdescr) {
2152 }
2153- LuaWorkerDescription(lua_State* L) : LuaMapObjectDescription(L) {
2154+ explicit LuaWorkerDescription(lua_State* L) : LuaMapObjectDescription(L) {
2155 }
2156
2157 void __persist(lua_State* L) override;
2158@@ -586,10 +586,10 @@
2159
2160 LuaSoldierDescription() {
2161 }
2162- LuaSoldierDescription(const Widelands::SoldierDescr* const soldierdescr)
2163+ explicit LuaSoldierDescription(const Widelands::SoldierDescr* const soldierdescr)
2164 : LuaWorkerDescription(soldierdescr) {
2165 }
2166- LuaSoldierDescription(lua_State* L) : LuaWorkerDescription(L) {
2167+ explicit LuaSoldierDescription(lua_State* L) : LuaWorkerDescription(L) {
2168 }
2169
2170 /*
2171@@ -632,10 +632,10 @@
2172
2173 LuaResourceDescription() : resourcedescr_(nullptr) {
2174 }
2175- LuaResourceDescription(const Widelands::ResourceDescription* const resourcedescr)
2176+ explicit LuaResourceDescription(const Widelands::ResourceDescription* const resourcedescr)
2177 : resourcedescr_(resourcedescr) {
2178 }
2179- LuaResourceDescription(lua_State* L) : resourcedescr_(nullptr) {
2180+ explicit LuaResourceDescription(lua_State* L) : resourcedescr_(nullptr) {
2181 report_error(L, "Cannot instantiate a 'LuaResourceDescription' directly!");
2182 }
2183
2184@@ -683,10 +683,10 @@
2185
2186 LuaTerrainDescription() : terraindescr_(nullptr) {
2187 }
2188- LuaTerrainDescription(const Widelands::TerrainDescription* const terraindescr)
2189+ explicit LuaTerrainDescription(const Widelands::TerrainDescription* const terraindescr)
2190 : terraindescr_(terraindescr) {
2191 }
2192- LuaTerrainDescription(lua_State* L) : terraindescr_(nullptr) {
2193+ explicit LuaTerrainDescription(lua_State* L) : terraindescr_(nullptr) {
2194 report_error(L, "Cannot instantiate a 'LuaTerrainDescription' directly!");
2195 }
2196
2197@@ -738,9 +738,9 @@
2198
2199 LuaEconomy() : economy_(nullptr) {
2200 }
2201- LuaEconomy(Widelands::Economy* economy) : economy_(economy) {
2202+ explicit LuaEconomy(Widelands::Economy* economy) : economy_(economy) {
2203 }
2204- LuaEconomy(lua_State* L) : economy_(nullptr) {
2205+ explicit LuaEconomy(lua_State* L) : economy_(nullptr) {
2206 report_error(L, "Cannot instantiate a 'LuaEconomy' directly!");
2207 }
2208
2209@@ -790,10 +790,10 @@
2210
2211 LuaMapObject() : ptr_(nullptr) {
2212 }
2213- LuaMapObject(Widelands::MapObject& mo) {
2214+ explicit LuaMapObject(Widelands::MapObject& mo) {
2215 ptr_ = &mo;
2216 }
2217- LuaMapObject(lua_State* L) : ptr_(nullptr) {
2218+ explicit LuaMapObject(lua_State* L) : ptr_(nullptr) {
2219 report_error(L, "Cannot instantiate a '%s' directly!", className);
2220 }
2221 virtual ~LuaMapObject() {
2222@@ -831,9 +831,9 @@
2223
2224 LuaBaseImmovable() {
2225 }
2226- LuaBaseImmovable(Widelands::BaseImmovable& mo) : LuaMapObject(mo) {
2227+ explicit LuaBaseImmovable(Widelands::BaseImmovable& mo) : LuaMapObject(mo) {
2228 }
2229- LuaBaseImmovable(lua_State* L) : LuaMapObject(L) {
2230+ explicit LuaBaseImmovable(lua_State* L) : LuaMapObject(L) {
2231 }
2232 virtual ~LuaBaseImmovable() {
2233 }
2234@@ -859,9 +859,9 @@
2235
2236 LuaPlayerImmovable() {
2237 }
2238- LuaPlayerImmovable(Widelands::PlayerImmovable& mo) : LuaBaseImmovable(mo) {
2239+ explicit LuaPlayerImmovable(Widelands::PlayerImmovable& mo) : LuaBaseImmovable(mo) {
2240 }
2241- LuaPlayerImmovable(lua_State* L) : LuaBaseImmovable(L) {
2242+ explicit LuaPlayerImmovable(lua_State* L) : LuaBaseImmovable(L) {
2243 }
2244 virtual ~LuaPlayerImmovable() {
2245 }
2246@@ -888,9 +888,9 @@
2247
2248 LuaPortDock() {
2249 }
2250- LuaPortDock(Widelands::PortDock& mo) : LuaPlayerImmovable(mo) {
2251+ explicit LuaPortDock(Widelands::PortDock& mo) : LuaPlayerImmovable(mo) {
2252 }
2253- LuaPortDock(lua_State* L) : LuaPlayerImmovable(L) {
2254+ explicit LuaPortDock(lua_State* L) : LuaPlayerImmovable(L) {
2255 }
2256 virtual ~LuaPortDock() {
2257 }
2258@@ -915,9 +915,9 @@
2259
2260 LuaBuilding() {
2261 }
2262- LuaBuilding(Widelands::Building& mo) : LuaPlayerImmovable(mo) {
2263+ explicit LuaBuilding(Widelands::Building& mo) : LuaPlayerImmovable(mo) {
2264 }
2265- LuaBuilding(lua_State* L) : LuaPlayerImmovable(L) {
2266+ explicit LuaBuilding(lua_State* L) : LuaPlayerImmovable(L) {
2267 }
2268 virtual ~LuaBuilding() {
2269 }
2270@@ -943,9 +943,9 @@
2271
2272 LuaFlag() {
2273 }
2274- LuaFlag(Widelands::Flag& mo) : LuaPlayerImmovable(mo) {
2275+ explicit LuaFlag(Widelands::Flag& mo) : LuaPlayerImmovable(mo) {
2276 }
2277- LuaFlag(lua_State* L) : LuaPlayerImmovable(L) {
2278+ explicit LuaFlag(lua_State* L) : LuaPlayerImmovable(L) {
2279 }
2280 virtual ~LuaFlag() {
2281 }
2282@@ -974,9 +974,9 @@
2283
2284 LuaRoad() {
2285 }
2286- LuaRoad(Widelands::Road& mo) : LuaPlayerImmovable(mo) {
2287+ explicit LuaRoad(Widelands::Road& mo) : LuaPlayerImmovable(mo) {
2288 }
2289- LuaRoad(lua_State* L) : LuaPlayerImmovable(L) {
2290+ explicit LuaRoad(lua_State* L) : LuaPlayerImmovable(L) {
2291 }
2292 virtual ~LuaRoad() {
2293 }
2294@@ -1011,9 +1011,9 @@
2295
2296 LuaConstructionSite() {
2297 }
2298- LuaConstructionSite(Widelands::ConstructionSite& mo) : LuaBuilding(mo) {
2299+ explicit LuaConstructionSite(Widelands::ConstructionSite& mo) : LuaBuilding(mo) {
2300 }
2301- LuaConstructionSite(lua_State* L) : LuaBuilding(L) {
2302+ explicit LuaConstructionSite(lua_State* L) : LuaBuilding(L) {
2303 }
2304 virtual ~LuaConstructionSite() {
2305 }
2306@@ -1039,9 +1039,9 @@
2307
2308 LuaWarehouse() {
2309 }
2310- LuaWarehouse(Widelands::Warehouse& mo) : LuaBuilding(mo) {
2311+ explicit LuaWarehouse(Widelands::Warehouse& mo) : LuaBuilding(mo) {
2312 }
2313- LuaWarehouse(lua_State* L) : LuaBuilding(L) {
2314+ explicit LuaWarehouse(lua_State* L) : LuaBuilding(L) {
2315 }
2316 virtual ~LuaWarehouse() {
2317 }
2318@@ -1078,9 +1078,9 @@
2319
2320 LuaProductionSite() {
2321 }
2322- LuaProductionSite(Widelands::ProductionSite& mo) : LuaBuilding(mo) {
2323+ explicit LuaProductionSite(Widelands::ProductionSite& mo) : LuaBuilding(mo) {
2324 }
2325- LuaProductionSite(lua_State* L) : LuaBuilding(L) {
2326+ explicit LuaProductionSite(lua_State* L) : LuaBuilding(L) {
2327 }
2328 virtual ~LuaProductionSite() {
2329 }
2330@@ -1114,9 +1114,9 @@
2331
2332 LuaMilitarySite() {
2333 }
2334- LuaMilitarySite(Widelands::MilitarySite& mo) : LuaBuilding(mo) {
2335+ explicit LuaMilitarySite(Widelands::MilitarySite& mo) : LuaBuilding(mo) {
2336 }
2337- LuaMilitarySite(lua_State* L) : LuaBuilding(L) {
2338+ explicit LuaMilitarySite(lua_State* L) : LuaBuilding(L) {
2339 }
2340 virtual ~LuaMilitarySite() {
2341 }
2342@@ -1144,9 +1144,9 @@
2343
2344 LuaTrainingSite() {
2345 }
2346- LuaTrainingSite(Widelands::TrainingSite& mo) : LuaProductionSite(mo) {
2347+ explicit LuaTrainingSite(Widelands::TrainingSite& mo) : LuaProductionSite(mo) {
2348 }
2349- LuaTrainingSite(lua_State* L) : LuaProductionSite(L) {
2350+ explicit LuaTrainingSite(lua_State* L) : LuaProductionSite(L) {
2351 }
2352 virtual ~LuaTrainingSite() {
2353 }
2354@@ -1174,9 +1174,9 @@
2355
2356 LuaBob() {
2357 }
2358- LuaBob(Widelands::Bob& mo) : LuaMapObject(mo) {
2359+ explicit LuaBob(Widelands::Bob& mo) : LuaMapObject(mo) {
2360 }
2361- LuaBob(lua_State* L) : LuaMapObject(L) {
2362+ explicit LuaBob(lua_State* L) : LuaMapObject(L) {
2363 }
2364 virtual ~LuaBob() {
2365 }
2366@@ -1203,9 +1203,9 @@
2367
2368 LuaWorker() {
2369 }
2370- LuaWorker(Widelands::Worker& w) : LuaBob(w) {
2371+ explicit LuaWorker(Widelands::Worker& w) : LuaBob(w) {
2372 }
2373- LuaWorker(lua_State* L) : LuaBob(L) {
2374+ explicit LuaWorker(lua_State* L) : LuaBob(L) {
2375 }
2376 virtual ~LuaWorker() {
2377 }
2378@@ -1232,9 +1232,9 @@
2379
2380 LuaSoldier() {
2381 }
2382- LuaSoldier(Widelands::Soldier& w) : LuaWorker(w) {
2383+ explicit LuaSoldier(Widelands::Soldier& w) : LuaWorker(w) {
2384 }
2385- LuaSoldier(lua_State* L) : LuaWorker(L) {
2386+ explicit LuaSoldier(lua_State* L) : LuaWorker(L) {
2387 }
2388 virtual ~LuaSoldier() {
2389 }
2390@@ -1263,9 +1263,9 @@
2391
2392 LuaShip() {
2393 }
2394- LuaShip(Widelands::Ship& s) : LuaBob(s) {
2395+ explicit LuaShip(Widelands::Ship& s) : LuaBob(s) {
2396 }
2397- LuaShip(lua_State* L) : LuaBob(L) {
2398+ explicit LuaShip(lua_State* L) : LuaBob(L) {
2399 }
2400 virtual ~LuaShip() {
2401 }
2402@@ -1304,11 +1304,11 @@
2403
2404 LuaField() {
2405 }
2406- LuaField(int16_t x, int16_t y) : coords_(Widelands::Coords(x, y)) {
2407- }
2408- LuaField(Widelands::Coords c) : coords_(c) {
2409- }
2410- LuaField(lua_State* L) {
2411+ explicit LuaField(int16_t x, int16_t y) : coords_(Widelands::Coords(x, y)) {
2412+ }
2413+ explicit LuaField(Widelands::Coords c) : coords_(c) {
2414+ }
2415+ explicit LuaField(lua_State* L) {
2416 report_error(L, "Cannot instantiate a 'Field' directly!");
2417 }
2418 virtual ~LuaField() {
2419@@ -1378,9 +1378,9 @@
2420
2421 LuaPlayerSlot() : player_number_(0) {
2422 }
2423- LuaPlayerSlot(Widelands::PlayerNumber plr) : player_number_(plr) {
2424+ explicit LuaPlayerSlot(Widelands::PlayerNumber plr) : player_number_(plr) {
2425 }
2426- LuaPlayerSlot(lua_State* L) : player_number_(0) {
2427+ explicit LuaPlayerSlot(lua_State* L) : player_number_(0) {
2428 report_error(L, "Cannot instantiate a 'PlayerSlot' directly!");
2429 }
2430 virtual ~LuaPlayerSlot() {
2431
2432=== modified file 'src/scripting/lua_path.cc'
2433--- src/scripting/lua_path.cc 2017-01-25 18:55:59 +0000
2434+++ src/scripting/lua_path.cc 2017-06-24 13:45:55 +0000
2435@@ -32,7 +32,7 @@
2436 /// A class that makes iteration over filename_?.png templates easy.
2437 class NumberGlob {
2438 public:
2439- NumberGlob(const std::string& file_template);
2440+ explicit NumberGlob(const std::string& file_template);
2441
2442 /// If there is a next filename, puts it in 's' and returns true.
2443 bool next(std::string* s);
2444
2445=== modified file 'src/scripting/lua_root.h'
2446--- src/scripting/lua_root.h 2017-01-25 18:55:59 +0000
2447+++ src/scripting/lua_root.h 2017-06-24 13:45:55 +0000
2448@@ -45,7 +45,7 @@
2449
2450 LuaGame() {
2451 }
2452- LuaGame(lua_State* L);
2453+ explicit LuaGame(lua_State* L);
2454
2455 void __persist(lua_State* L) override;
2456 void __unpersist(lua_State* L) override;
2457@@ -82,7 +82,7 @@
2458
2459 LuaEditor() {
2460 }
2461- LuaEditor(lua_State* L);
2462+ explicit LuaEditor(lua_State* L);
2463 virtual ~LuaEditor() {
2464 }
2465
2466@@ -111,7 +111,7 @@
2467
2468 LuaWorld() {
2469 }
2470- LuaWorld(lua_State* L);
2471+ explicit LuaWorld(lua_State* L);
2472
2473 void __persist(lua_State* L) override;
2474 void __unpersist(lua_State* L) override;
2475@@ -147,7 +147,7 @@
2476
2477 LuaTribes() {
2478 }
2479- LuaTribes(lua_State* L);
2480+ explicit LuaTribes(lua_State* L);
2481
2482 void __persist(lua_State* L) override;
2483 void __unpersist(lua_State* L) override;
2484
2485=== modified file 'src/scripting/lua_table.h'
2486--- src/scripting/lua_table.h 2017-01-25 18:55:59 +0000
2487+++ src/scripting/lua_table.h 2017-06-24 13:45:55 +0000
2488@@ -33,7 +33,7 @@
2489
2490 class LuaTableKeyError : public LuaError {
2491 public:
2492- LuaTableKeyError(const std::string& wanted)
2493+ explicit LuaTableKeyError(const std::string& wanted)
2494 : LuaError(wanted + " is not a field in this table.") {
2495 }
2496 };
2497
2498=== modified file 'src/scripting/lua_ui.h'
2499--- src/scripting/lua_ui.h 2017-01-25 18:55:59 +0000
2500+++ src/scripting/lua_ui.h 2017-06-24 13:45:55 +0000
2501@@ -48,9 +48,9 @@
2502
2503 LuaPanel() : panel_(nullptr) {
2504 }
2505- LuaPanel(UI::Panel* p) : panel_(p) {
2506+ explicit LuaPanel(UI::Panel* p) : panel_(p) {
2507 }
2508- LuaPanel(lua_State* L) : panel_(nullptr) {
2509+ explicit LuaPanel(lua_State* L) : panel_(nullptr) {
2510 report_error(L, "Cannot instantiate a '%s' directly!", className);
2511 }
2512 virtual ~LuaPanel() {
2513@@ -95,9 +95,9 @@
2514
2515 LuaButton() : LuaPanel() {
2516 }
2517- LuaButton(UI::Panel* p) : LuaPanel(p) {
2518+ explicit LuaButton(UI::Panel* p) : LuaPanel(p) {
2519 }
2520- LuaButton(lua_State* L) : LuaPanel(L) {
2521+ explicit LuaButton(lua_State* L) : LuaPanel(L) {
2522 }
2523 virtual ~LuaButton() {
2524 }
2525@@ -127,9 +127,9 @@
2526
2527 LuaTab() : LuaPanel() {
2528 }
2529- LuaTab(UI::Panel* p) : LuaPanel(p) {
2530+ explicit LuaTab(UI::Panel* p) : LuaPanel(p) {
2531 }
2532- LuaTab(lua_State* L) : LuaPanel(L) {
2533+ explicit LuaTab(lua_State* L) : LuaPanel(L) {
2534 }
2535 virtual ~LuaTab() {
2536 }
2537@@ -159,9 +159,9 @@
2538
2539 LuaWindow() : LuaPanel() {
2540 }
2541- LuaWindow(UI::Panel* p) : LuaPanel(p) {
2542+ explicit LuaWindow(UI::Panel* p) : LuaPanel(p) {
2543 }
2544- LuaWindow(lua_State* L) : LuaPanel(L) {
2545+ explicit LuaWindow(lua_State* L) : LuaPanel(L) {
2546 }
2547 virtual ~LuaWindow() {
2548 }
2549@@ -190,9 +190,9 @@
2550
2551 LuaMapView() : LuaPanel() {
2552 }
2553- LuaMapView(MapView* p) : LuaPanel(p) {
2554+ explicit LuaMapView(MapView* p) : LuaPanel(p) {
2555 }
2556- LuaMapView(lua_State* L);
2557+ explicit LuaMapView(lua_State* L);
2558 virtual ~LuaMapView() {
2559 }
2560
2561
2562=== modified file 'src/scripting/test/test_luna.cc'
2563--- src/scripting/test/test_luna.cc 2017-06-23 08:33:03 +0000
2564+++ src/scripting/test/test_luna.cc 2017-06-24 13:45:55 +0000
2565@@ -58,7 +58,7 @@
2566 LuaClass() : x(123), prop(246) {
2567 }
2568 virtual ~LuaClass();
2569- LuaClass(lua_State* /* L */) : x(124), prop(248) {
2570+ explicit LuaClass(lua_State* /* L */) : x(124), prop(248) {
2571 }
2572 virtual int test(lua_State* L) {
2573 lua_pushuint32(L, x);
2574@@ -98,7 +98,7 @@
2575 LUNA_CLASS_HEAD(LuaSubClass);
2576 LuaSubClass() : y(1230) {
2577 }
2578- LuaSubClass(lua_State* L) : LuaClass(L), y(1240) {
2579+ explicit LuaSubClass(lua_State* L) : LuaClass(L), y(1240) {
2580 }
2581 virtual int subtest(lua_State* L);
2582 void __persist(lua_State* /* L */) override {
2583@@ -125,7 +125,7 @@
2584 LUNA_CLASS_HEAD(LuaVirtualClass);
2585 LuaVirtualClass() : z(12300) {
2586 }
2587- LuaVirtualClass(lua_State* L) : LuaClass(L), z(12400) {
2588+ explicit LuaVirtualClass(lua_State* L) : LuaClass(L), z(12400) {
2589 }
2590 virtual int virtualtest(lua_State* L);
2591 void __persist(lua_State* /* L */) override {
2592@@ -168,7 +168,7 @@
2593 LUNA_CLASS_HEAD(LuaMultiClass);
2594 LuaMultiClass() : z(12300) {
2595 }
2596- LuaMultiClass(lua_State* L) : LuaClass(L), z(12400) {
2597+ explicit LuaMultiClass(lua_State* L) : LuaClass(L), z(12400) {
2598 }
2599 virtual int virtualtest(lua_State* L);
2600 void __persist(lua_State* /* L */) override {
2601
2602=== modified file 'src/sound/fxset.h'
2603--- src/sound/fxset.h 2017-01-25 18:55:59 +0000
2604+++ src/sound/fxset.h 2017-06-24 13:45:55 +0000
2605@@ -45,7 +45,7 @@
2606 */
2607 struct FXset {
2608 friend class SoundHandler;
2609- FXset(uint8_t priority = PRIO_MEDIUM);
2610+ explicit FXset(uint8_t priority = PRIO_MEDIUM);
2611 ~FXset();
2612
2613 void add_fx(Mix_Chunk* fx, uint8_t prio = PRIO_MEDIUM);
2614
2615=== modified file 'src/ui_basic/progresswindow.h'
2616--- src/ui_basic/progresswindow.h 2017-05-14 04:38:39 +0000
2617+++ src/ui_basic/progresswindow.h 2017-06-24 13:45:55 +0000
2618@@ -47,7 +47,7 @@
2619
2620 /// Manages a progress window on the screen.
2621 struct ProgressWindow : public UI::FullscreenWindow {
2622- ProgressWindow(const std::string& background = std::string());
2623+ explicit ProgressWindow(const std::string& background = std::string());
2624 ~ProgressWindow();
2625
2626 /// Register additional visualization (tips/hints, animation, etc)
2627
2628=== modified file 'src/ui_basic/table.h'
2629--- src/ui_basic/table.h 2017-03-14 06:48:59 +0000
2630+++ src/ui_basic/table.h 2017-06-24 13:45:55 +0000
2631@@ -123,7 +123,7 @@
2632 template <> class Table<void*> : public Panel {
2633 public:
2634 struct EntryRecord {
2635- EntryRecord(void* entry);
2636+ explicit EntryRecord(void* entry);
2637
2638 void set_picture(uint8_t col, const Image* pic, const std::string& = std::string());
2639 void set_string(uint8_t col, const std::string&);
2640
2641=== modified file 'src/ui_fsmenu/campaign_select.h'
2642--- src/ui_fsmenu/campaign_select.h 2017-01-25 18:55:59 +0000
2643+++ src/ui_fsmenu/campaign_select.h 2017-06-24 13:45:55 +0000
2644@@ -93,7 +93,7 @@
2645 */
2646 class FullscreenMenuCampaignMapSelect : public FullscreenMenuLoadMapOrGame {
2647 public:
2648- FullscreenMenuCampaignMapSelect(bool is_tutorial = false);
2649+ explicit FullscreenMenuCampaignMapSelect(bool is_tutorial = false);
2650
2651 std::string get_map();
2652 void set_campaign(uint32_t);
2653
2654=== modified file 'src/ui_fsmenu/options.h'
2655--- src/ui_fsmenu/options.h 2017-01-25 18:55:59 +0000
2656+++ src/ui_fsmenu/options.h 2017-06-24 13:45:55 +0000
2657@@ -79,7 +79,7 @@
2658 uint32_t active_tab;
2659 };
2660
2661- OptionsCtrl(Section&);
2662+ explicit OptionsCtrl(Section&);
2663 void handle_menu();
2664 OptionsCtrl::OptionsStruct options_struct(uint32_t active_tab);
2665 void save_options();
2666@@ -95,7 +95,7 @@
2667
2668 class FullscreenMenuOptions : public FullscreenMenuBase {
2669 public:
2670- FullscreenMenuOptions(OptionsCtrl::OptionsStruct opt);
2671+ explicit FullscreenMenuOptions(OptionsCtrl::OptionsStruct opt);
2672 OptionsCtrl::OptionsStruct get_values();
2673
2674 private:
2675
2676=== modified file 'src/wui/interactive_base.cc'
2677--- src/wui/interactive_base.cc 2017-06-15 16:34:58 +0000
2678+++ src/wui/interactive_base.cc 2017-06-24 13:45:55 +0000
2679@@ -70,7 +70,7 @@
2680 MiniMap::Registry minimap;
2681 std::unique_ptr<QuickNavigation> quicknavigation;
2682
2683- InteractiveBaseInternals(QuickNavigation* qnav) : mm(nullptr), quicknavigation(qnav) {
2684+ explicit InteractiveBaseInternals(QuickNavigation* qnav) : mm(nullptr), quicknavigation(qnav) {
2685 }
2686 };
2687
2688
2689=== modified file 'src/wui/login_box.h'
2690--- src/wui/login_box.h 2017-01-25 18:55:59 +0000
2691+++ src/wui/login_box.h 2017-06-24 13:45:55 +0000
2692@@ -27,7 +27,7 @@
2693 #include "ui_basic/window.h"
2694
2695 struct LoginBox : public UI::Window {
2696- LoginBox(UI::Panel&);
2697+ explicit LoginBox(UI::Panel&);
2698
2699 std::string get_nickname() {
2700 return eb_nickname->text();
2701
2702=== modified file 'src/wui/quicknavigation.h'
2703--- src/wui/quicknavigation.h 2017-01-25 18:55:59 +0000
2704+++ src/wui/quicknavigation.h 2017-06-24 13:45:55 +0000
2705@@ -44,7 +44,7 @@
2706 }
2707 };
2708
2709- QuickNavigation(MapView* map_view);
2710+ explicit QuickNavigation(MapView* map_view);
2711
2712 // Set the landmark for 'index' to 'view'. 'index' must be < 10.
2713 void set_landmark(size_t index, const MapView::View& view);

Subscribers

People subscribed via source and target branches

to status/vote changes: