Merge lp:~klaus-halfmann/widelands/feature-Hasi50 into lp:widelands

Proposed by Klaus Halfmann
Status: Merged
Merged at revision: 7686
Proposed branch: lp:~klaus-halfmann/widelands/feature-Hasi50
Merge into: lp:widelands
Diff against target: 257 lines (+38/-31)
14 files modified
.bzrignore (+3/-0)
src/ai/defaultai.cc (+2/-2)
src/base/exceptions.cc (+1/-1)
src/base/wexception.h (+2/-2)
src/economy/portdock.h (+1/-1)
src/logic/bob.h (+5/-1)
src/logic/building.h (+1/-1)
src/logic/game_controller.h (+2/-2)
src/logic/instances.h (+3/-3)
src/logic/message.h (+9/-9)
src/logic/requirements.h (+2/-2)
src/logic/ware_descr.h (+5/-5)
src/map_io/map_allowed_building_types_packet.cc (+1/-1)
src/ui_fsmenu/main_menu.h (+1/-1)
To merge this branch: bzr merge lp:~klaus-halfmann/widelands/feature-Hasi50
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+281466@code.launchpad.net

Description of the change

Removed some warnings I got from clang / doxygen on OSX OSX 10.11.2 (15C50) with XCode Version 7.2 (7C68)

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

Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch lp:~klaus-halfmann/widelands/feature-Hasi50 mirrored to https://github.com/widelands/widelands/tree/_klaus_halfmann_widelands_feature_Hasi50

You can give me commands by starting a line with @bunnybot <command>. I understand:
 merge: Merges the source branch into the target branch, closing the pull request.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Travis build 131 has changed state to: passed. Details: https://travis-ci.org/widelands/widelands/builds/99834129.

Revision history for this message
SirVer (sirver) wrote :

lgtm.

@bunnybot merge

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

I added a code style comment. Also, is the crash in the attached bug fixed now?

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Hello GunChleoc

> you wrote at 05.01.2016 14:59
>
> I added a code style comment. Also, is the crash in the attached bug fixed now?

The crash is not directly related to my contribution, it happen to a trunk
built as well, Mut I suspect my Xcode/Clang compiler as of now,
I will try to debug it with Xcode, but reproducing depends on the AI
behaving in a specific way.

> Has this TODO been dealt with?

Not yet, I am preparing a bigger contribution that will fix
most clang / doxigen warning. But I use the correct syntax
as the code check has pointed me to do so.

> // TODO correct (?) Send a signal that may switch to some other \ref Task

If you know that this is the correct comment, please remove the TODO.

This was my first contribution to widelands ever and I am still struggling
with all kinds of obstacles. So please apologize my mistakes …

--
Hasi50

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2014-07-26 13:07:12 +0000
3+++ .bzrignore 2016-01-02 12:59:48 +0000
4@@ -18,3 +18,6 @@
5
6 # Python compiled files.
7 *.pyc
8+
9+# OS-X Meta Files
10+.DS_Store
11
12=== modified file 'src/ai/defaultai.cc'
13--- src/ai/defaultai.cc 2015-12-13 19:33:22 +0000
14+++ src/ai/defaultai.cc 2016-01-02 12:59:48 +0000
15@@ -1,5 +1,5 @@
16 /*
17- * Copyright (C) 2004, 2006-2010, 2012 by the Widelands Development Team
18+ * Copyright (C) 2004, 2006-2010, 2012, 2016 by the Widelands Development Team
19 *
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22@@ -4152,7 +4152,7 @@
23
24 // counts produced output on stock
25 // if multiple outputs, it returns lowest value
26-uint32_t DefaultAI::get_stocklevel(DescriptionIndex wt) {
27+uint32_t DefaultAI::get_stocklevel(Widelands::DescriptionIndex wt) {
28 uint32_t count = 0;
29
30 for (EconomyObserver* observer : economies) {
31
32=== modified file 'src/base/exceptions.cc'
33--- src/base/exceptions.cc 2014-09-14 16:08:13 +0000
34+++ src/base/exceptions.cc 2016-01-02 12:59:48 +0000
35@@ -1,5 +1,5 @@
36 /*
37- * Copyright (C) 2002, 2006-2009 by the Widelands Development Team
38+ * Copyright (C) 2002, 2006-2009, 2016 by the Widelands Development Team
39 *
40 * This program is free software; you can redistribute it and/or
41 * modify it under the terms of the GNU General Public License
42
43=== modified file 'src/base/wexception.h'
44--- src/base/wexception.h 2014-09-09 17:15:20 +0000
45+++ src/base/wexception.h 2016-01-02 12:59:48 +0000
46@@ -1,5 +1,5 @@
47 /*
48- * Copyright (C) 2002, 2003, 2009 by the Widelands Development Team
49+ * Copyright (C) 2002, 2003, 2009, 2016 by the Widelands Development Team
50 *
51 * This program is free software; you can redistribute it and/or
52 * modify it under the terms of the GNU General Public License
53@@ -43,7 +43,7 @@
54 */
55 struct WException : public std::exception {
56 explicit WException
57- (const char * file, uint32_t line, const char * fmt, ...)
58+ (char const * const file, uint32_t const line, char const * const fmt, ...)
59 PRINTF_FORMAT(4, 5);
60
61 /**
62
63=== modified file 'src/economy/portdock.h'
64--- src/economy/portdock.h 2015-11-11 09:52:55 +0000
65+++ src/economy/portdock.h 2016-01-02 12:59:48 +0000
66@@ -54,7 +54,7 @@
67 * transported by ship are stored in the PortDock instead of
68 * the associated @ref WareHouse.
69 *
70- * @paragraph Lifetime
71+ * @paragraph PortDockLifetime
72 *
73 * The PortDock is created and removed by its owning warehouse.
74 * Throughout the life of the PortDock, the corresponding @ref Warehouse
75
76=== modified file 'src/logic/bob.h'
77--- src/logic/bob.h 2015-11-01 10:11:56 +0000
78+++ src/logic/bob.h 2016-01-02 12:59:48 +0000
79@@ -48,7 +48,9 @@
80
81 class Bob;
82
83-// Description for the Bob class.
84+/**
85+ * Implement MapObjectDescr for the following \ref Bob class.
86+ */
87 class BobDescr : public MapObjectDescr {
88 public:
89 friend struct MapBobdataPacket;
90@@ -255,6 +257,8 @@
91
92 // default tasks
93 void reset_tasks(Game &);
94+
95+ // TODO correct (?) Send a signal that may switch to some other \ref Task
96 void send_signal(Game &, char const *);
97 void start_task_idle(Game &, uint32_t anim, int32_t timeout);
98
99
100=== modified file 'src/logic/building.h'
101--- src/logic/building.h 2015-12-03 21:12:12 +0000
102+++ src/logic/building.h 2016-01-02 12:59:48 +0000
103@@ -1,5 +1,5 @@
104 /*
105- * Copyright (C) 2002-2004, 2006-2013 by the Widelands Development Team
106+ * Copyright (C) 2002-2004, 2006-2013, 2016 by the Widelands Development Team
107 *
108 * This program is free software; you can redistribute it and/or
109 * modify it under the terms of the GNU General Public License
110
111=== modified file 'src/logic/game_controller.h'
112--- src/logic/game_controller.h 2015-03-01 09:21:20 +0000
113+++ src/logic/game_controller.h 2016-01-02 12:59:48 +0000
114@@ -1,5 +1,5 @@
115 /*
116- * Copyright (C) 2008-2011, 2013, 2015 by the Widelands Development Team
117+ * Copyright (C) 2008-2011, 2013, 2015-2016 by the Widelands Development Team
118 *
119 * This program is free software; you can redistribute it and/or
120 * modify it under the terms of the GNU General Public License
121@@ -95,7 +95,7 @@
122 * by the win_condition scripts.
123 * \param player : the player idx;
124 * \param result : the player result
125- * \param info : The info string (\see \struct PlayerEndStatus for allowed values)
126+ * \param info : The info string (\see \struct PlayerEndStatus)
127 */
128 virtual void report_result
129 (uint8_t /* player */,
130
131=== modified file 'src/logic/instances.h'
132--- src/logic/instances.h 2015-11-27 12:46:45 +0000
133+++ src/logic/instances.h 2016-01-02 12:59:48 +0000
134@@ -1,5 +1,5 @@
135 /*
136- * Copyright (C) 2002-2004, 2006-2013 by the Widelands Development Team
137+ * Copyright (C) 2002-2004, 2006-2013, 2016 by the Widelands Development Team
138 *
139 * This program is free software; you can redistribute it and/or
140 * modify it under the terms of the GNU General Public License
141@@ -135,7 +135,7 @@
142 bool is_animation_known(const std::string & name) const;
143 void add_animation(const std::string & name, uint32_t anim);
144
145- /// Sets the directional animations in 'anims' with the animations '<prefix>_(ne|e|se|sw|w|nw)'.
146+ /// Sets the directional animations in 'anims' with the animations '&lt;prefix&gt;_(ne|e|se|sw|w|nw)'.
147 void add_directional_animation(DirAnimations* anims, const std::string& prefix);
148
149 /// Returns the image for the first frame of the idle animation if the MapObject has animations,
150@@ -252,7 +252,7 @@
151 * the game. No conncetion is handled in this class.
152 * \param serial : the object serial
153 */
154- boost::signals2::signal<void(uint32_t)> removed;
155+ boost::signals2::signal<void(uint32_t serial)> removed;
156
157 /**
158 * Attributes are fixed boolean properties of an object.
159
160=== modified file 'src/logic/message.h'
161--- src/logic/message.h 2015-11-04 16:48:56 +0000
162+++ src/logic/message.h 2016-01-02 12:59:48 +0000
163@@ -53,15 +53,15 @@
164
165 /**
166 * A new message to be displayed to the player
167- * \param msgtype The type of message (economy, geologists, etc.)
168- * \param sent_time The (game) time at which the message is sent
169- * \param t The message title
170- * \param b The message body
171- * \param c The message coords. The player will be able to taken there.
172- * Defaults to Coords::null()
173- * \param ser A MapObject serial. If non null, the message will be deleted once
174- * the object is removed from the game. Defaults to 0
175- * \param s The message status. Defaults to Status::New
176+ * \param msgtype The type of message (economy, geologists, etc.)
177+ * \param sent_time The (game) time at which the message is sent
178+ * \param init_title The intial message title
179+ * \param init_body The initial message body
180+ * \param c The message coords. The player will be able to position its view there.
181+ * Defaults to Coords::null()
182+ * \param ser A MapObject serial. If non null, the message will be deleted once
183+ * the object is removed from the game. Defaults to 0
184+ * \param s The message status. Defaults to Status::New
185 */
186 Message
187 (Message::Type msgtype,
188
189=== modified file 'src/logic/requirements.h'
190--- src/logic/requirements.h 2014-09-19 12:54:54 +0000
191+++ src/logic/requirements.h 2016-01-02 12:59:48 +0000
192@@ -1,5 +1,5 @@
193 /*
194- * Copyright (C) 2008-2010 by the Widelands Development Team
195+ * Copyright (C) 2008-2010, 2016 by the Widelands Development Team
196 *
197 * This program is free software; you can redistribute it and/or
198 * modify it under the terms of the GNU General Public License
199@@ -44,7 +44,7 @@
200 * Requirements can be attached to Requests.
201 *
202 * Requirements are matched to a \ref MapObject 's \ref TrainingAttribute as
203- * returned by \ref get_training_attribute .
204+ * returned by \ref MapObject::get_training_attribute .
205 */
206 struct Requirements {
207 private:
208
209=== modified file 'src/logic/ware_descr.h'
210--- src/logic/ware_descr.h 2015-11-21 11:47:05 +0000
211+++ src/logic/ware_descr.h 2016-01-02 12:59:48 +0000
212@@ -1,5 +1,5 @@
213 /*
214- * Copyright (C) 2002-2003, 2006-2009 by the Widelands Development Team
215+ * Copyright (C) 2002-2003, 2006-2009, 2015 by the Widelands Development Team
216 *
217 * This program is free software; you can redistribute it and/or
218 * modify it under the terms of the GNU General Public License
219@@ -33,10 +33,10 @@
220 class Image;
221 class LuaTable;
222
223-#define WARE_MENU_PIC_WIDTH 24 //< Default width for ware's menu icons
224-#define WARE_MENU_PIC_HEIGHT 24 //< Default height for ware's menu icons
225-#define WARE_MENU_PIC_PAD_X 3 //< Default padding between menu icons
226-#define WARE_MENU_PIC_PAD_Y 4 //< Default padding between menu icons
227+#define WARE_MENU_PIC_WIDTH 24 //!< Default width for ware's menu icons
228+#define WARE_MENU_PIC_HEIGHT 24 //!< Default height for ware's menu icons
229+#define WARE_MENU_PIC_PAD_X 3 //!< Default padding between menu icons
230+#define WARE_MENU_PIC_PAD_Y 4 //!< Default padding between menu icons
231
232 namespace Widelands {
233
234
235=== modified file 'src/map_io/map_allowed_building_types_packet.cc'
236--- src/map_io/map_allowed_building_types_packet.cc 2015-11-11 09:53:54 +0000
237+++ src/map_io/map_allowed_building_types_packet.cc 2016-01-02 12:59:48 +0000
238@@ -1,5 +1,5 @@
239 /*
240- * Copyright (C) 2002-2004, 2006-2008, 2010 by the Widelands Development Team
241+ * Copyright (C) 2002-2004, 2006-2008, 2010, 2016 by the Widelands Development Team
242 *
243 * This program is free software; you can redistribute it and/or
244 * modify it under the terms of the GNU General Public License
245
246=== modified file 'src/ui_fsmenu/main_menu.h'
247--- src/ui_fsmenu/main_menu.h 2014-11-13 11:29:20 +0000
248+++ src/ui_fsmenu/main_menu.h 2016-01-02 12:59:48 +0000
249@@ -35,7 +35,7 @@
250
251 /// Sets the background image and assigns values
252 /// for alignment and size, depending on screen size
253- FullscreenMenuMainMenu(char const * background_image);
254+ FullscreenMenuMainMenu(const char* background_image);
255
256 protected:
257 const uint32_t m_box_x, m_box_y;

Subscribers

People subscribed via source and target branches

to status/vote changes: