Nux

Merge lp:~hikiko/nux/nux.fix-minor-errors-warnings into lp:nux

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Christopher Townsend
Approved revision: 860
Merged at revision: 829
Proposed branch: lp:~hikiko/nux/nux.fix-minor-errors-warnings
Merge into: lp:nux
Diff against target: 899 lines (+81/-171)
37 files modified
Nux/AbstractCheckedButton.h (+2/-2)
Nux/Area.cpp (+1/-1)
Nux/CheckBox.h (+2/-2)
Nux/ColorEditor.h (+4/-6)
Nux/GroupBox.cpp (+9/-50)
Nux/GroupBox.h (+0/-1)
Nux/GroupBox2.cpp (+7/-37)
Nux/GroupBox2.h (+0/-1)
Nux/HSplitter.cpp (+2/-2)
Nux/InputArea.cpp (+1/-1)
Nux/KeyboardHandler.cpp (+3/-3)
Nux/LayeredLayout.cpp (+7/-5)
Nux/LayeredLayout.h (+4/-2)
Nux/MainLoopGLib.cpp (+1/-1)
Nux/RGBValuator.h (+2/-2)
Nux/RadioButton.h (+2/-2)
Nux/StaticText.h (+2/-2)
Nux/StaticTextBox.h (+1/-1)
Nux/TextEntry.cpp (+2/-2)
Nux/TextEntry.h (+2/-2)
Nux/ToolButton.h (+0/-2)
Nux/VSplitter.cpp (+2/-2)
Nux/View.cpp (+1/-1)
Nux/View.h (+1/-1)
NuxCore/NumberConversion.cpp (+1/-3)
NuxCore/TextString.h (+2/-1)
NuxGraphics/GLPBuffer.h (+0/-1)
NuxGraphics/GLSh_ColorPicker.h (+0/-5)
NuxGraphics/GLSh_DrawFunction.h (+0/-7)
NuxGraphics/GLTextureResourceManager.cpp (+2/-2)
NuxGraphics/GpuDevice.cpp (+1/-1)
NuxGraphics/IOpenGLCubeTexture.cpp (+2/-2)
NuxGraphics/IOpenGLCubeTexture.h (+2/-2)
NuxGraphics/IOpenGLVolumeTexture.cpp (+2/-2)
NuxGraphics/IOpenGLVolumeTexture.h (+2/-2)
NuxGraphics/ImageSurface.h (+0/-3)
tools/unity_support_test.c (+9/-9)
To merge this branch: bzr merge lp:~hikiko/nux/nux.fix-minor-errors-warnings
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+193815@code.launchpad.net

Commit message

small fixes based on clang errors and warnings

Description of the change

small fixes based on clang errors and warnings

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Thanks for working on this. Overall, looks good, but a couple of things.

First, instead of commenting out variables, let's just remove them to cut down on code clutter. For example,

105 +// , bCaptionAvailable(false)
118 +// bool bCaptionAvailable;
131 +// , bCaptionAvailable(false)

etc.

Second, this line will generate a failure when building for a release:
495 - bufferlen = bufferlen; // Stop unused param warning in release mode.
496 + bufferlen = 0; // Stop unused param warning in release mode.

Lastly, this line causes a CI failure:
571 - Glew_Ok = Glew_Ok; // Suppress compiler warning about set but not used variable.
572 + Glew_Ok = 0; // Suppress compiler warning about set but not used variable.

review: Needs Fixing
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

Thanks a lot for the review!
I'm about to fix the lines that cause the failures.

Just a question about:
105 +// , bCaptionAvailable(false)
118 +// bool bCaptionAvailable;
131 +// , bCaptionAvailable(false)
etc
I 've seen that in Nux/GroupBox.cpp Nux/GroupBox2.cpp and a few other places there are some commented-out conditions depending on these variables. For example: http://paste.ubuntu.com/6363550/ shows some relevant code from GroupBox.cpp. Those comments were the reason I didn't entirely delete the declarations: I thought someone left them there intentionally and he might need to put back the conditions at some point. If that's not the case then I should probably remove both the variables and the commented out code to not confuse us anymore. What do you think?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) wrote :

(1) the rule is never comment out code, just remove it (if you need to revert to a previous version, that's what bzr is for) -- commented-out code can confound code maintenance, and that's all we do, so we want to make our jobs easier

(2) these changes look like they break the ABI (dang you, Nux and your horrible interface implementation) -- please hold off on global approval until this gets properly aligned with the rest of the stack. We need to coordinate ABI changes and this patch may beed to bump the ABI.

Revision history for this message
Christopher Townsend (townsend) wrote :

Yes, let's just remove the commented out code blocks and conditionals. As Stephen said, we can use bzr to get those back if we ever need to.

Also,

495 - bufferlen = bufferlen; // Stop unused param warning in release mode.
496 + bufferlen = 0; // Stop unused param warning in release mode.

will need to fixed up like you did for Glew_Ok.

Thanks!

859. By Eleni Maria Stea

uncommented out the logger

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
860. By Eleni Maria Stea

merged to trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Looks good, +1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/AbstractCheckedButton.h'
2--- Nux/AbstractCheckedButton.h 2011-10-18 20:00:59 +0000
3+++ Nux/AbstractCheckedButton.h 2013-11-06 14:37:31 +0000
4@@ -96,13 +96,13 @@
5 /*!
6 Prevent changing the minimum height of the StaticText view.
7 */
8- virtual void SetMinimumHeight(){};
9+ virtual void SetMinimumHeight(int h){};
10
11 //! Override of Area::SetMaximumHeight and made private.
12 /*!
13 Prevent changing the maximum height of the StaticText view.
14 */
15- virtual void SetMaximumHeight(){};
16+ virtual void SetMaximumHeight(int h){};
17 };
18
19 }
20
21=== modified file 'Nux/Area.cpp'
22--- Nux/Area.cpp 2013-10-30 18:47:52 +0000
23+++ Nux/Area.cpp 2013-11-06 14:37:31 +0000
24@@ -979,7 +979,7 @@
25 if ((event_type == NUX_MOUSE_WHEEL) && mouse_pointer_inside_area)
26 {
27 if (accept_mouse_wheel_event_ == false)
28- return NULL;
29+ return false;
30 }
31
32 return mouse_pointer_inside_area;
33
34=== modified file 'Nux/CheckBox.h'
35--- Nux/CheckBox.h 2011-10-18 20:00:59 +0000
36+++ Nux/CheckBox.h 2013-11-06 14:37:31 +0000
37@@ -75,13 +75,13 @@
38 /*!
39 Prevent changing the minimum height of the StaticText view.
40 */
41- virtual void SetMinimumHeight(){};
42+ virtual void SetMinimumHeight(int h){};
43
44 //! Override of Area::SetMaximumHeight and made private.
45 /*!
46 Prevent changing the maximum height of the StaticText view.
47 */
48- virtual void SetMaximumHeight(){};
49+ virtual void SetMaximumHeight(int h){};
50 };
51
52 }
53
54=== modified file 'Nux/ColorEditor.h'
55--- Nux/ColorEditor.h 2011-10-18 20:00:59 +0000
56+++ Nux/ColorEditor.h 2013-11-06 14:37:31 +0000
57@@ -128,25 +128,25 @@
58 /*!
59 Prevent changing the minimum height of the ColorEditor view.
60 */
61- virtual void SetMinimumHeight(){};
62+ virtual void SetMinimumHeight(int h){};
63
64 //! Override of Area::SetMaximumHeight and made private.
65 /*!
66 Prevent changing the maximum height of the ColorEditor view.
67 */
68- virtual void SetMaximumHeight(){};
69+ virtual void SetMaximumHeight(int h){};
70
71 //! Override of Area::SetMinimumWidth and made private.
72 /*!
73 Prevent changing the minimum width of the ColorEditor view.
74 */
75- virtual void SetMinimumWidth(){};
76+ virtual void SetMinimumWidth(int w){};
77
78 //! Override of Area::SetMaximumWidth and made private.
79 /*!
80 Prevent changing the maximum width of the ColorEditor view.
81 */
82- virtual void SetMaximumWidth(){};
83+ virtual void SetMaximumWidth(int w){};
84
85 void DrawBaseChannelMarker(GraphicsEngine &graphics_engine);
86 void DrawRGB(GraphicsEngine &graphics_engine, bool force_draw);
87@@ -196,8 +196,6 @@
88 RadioButton *valuecheck;
89 EditTextBox *value_text_entry_;
90
91- Button *OkButton;
92- Button *CancelButton;
93 RadioButtonGroup *radiogroup;
94
95 DoubleValidator m_Validator;
96
97=== modified file 'Nux/GroupBox.cpp'
98--- Nux/GroupBox.cpp 2012-10-02 07:32:55 +0000
99+++ Nux/GroupBox.cpp 2013-11-06 14:37:31 +0000
100@@ -29,7 +29,6 @@
101
102 GroupBox::GroupBox(const char * /* Caption */, NUX_FILE_LINE_DECL)
103 : View(NUX_FILE_LINE_PARAM)
104- , bCaptionAvailable(false)
105 , m_layout(0)
106 {
107 m_CaptionArea.SetMinimumSize(DEFAULT_WIDGET_WIDTH, PRACTICAL_WIDGET_HEIGHT);
108@@ -51,24 +50,10 @@
109
110 Geometry wireborder_geo = GetGeometry();
111
112- //if(bCaptionAvailable)
113- {
114- wireborder_geo.OffsetPosition(0, 10);
115- wireborder_geo.OffsetSize(0, -10);
116- }
117-// else
118-// {
119-// wireborder_geo.OffsetPosition(0, 0);
120-// wireborder_geo.OffsetSize(0, 0);
121-// }
122-
123- //if(bCaptionAvailable)
124- {
125- //GetPainter().Paint2DQuadColor(m_CaptionArea.GetGeometry(), COLOR_BACKGROUND_PRIMARY);
126- //GetPainter().PaintTextLineStatic(m_CaptionArea.GetGeometry(), m_CaptionArea.GetCaptionString(), eAlignTextCenter);
127- GetPainter().PaintTextLineStatic(graphics_engine, GetSysBoldFont(), m_CaptionArea.GetGeometry(), m_CaptionArea.GetBaseString(), GetTextColor(),
128+ wireborder_geo.OffsetPosition(0, 10);
129+ wireborder_geo.OffsetSize(0, -10);
130+ GetPainter().PaintTextLineStatic(graphics_engine, GetSysBoldFont(), m_CaptionArea.GetGeometry(), m_CaptionArea.GetBaseString(), GetTextColor(),
131 true, eAlignTextCenter);
132- }
133
134 if (m_layout != 0)
135 {
136@@ -115,16 +100,8 @@
137 if (view_layout_)
138 {
139 Geometry layout_geo = GetGeometry();
140- //if(bCaptionAvailable)
141- {
142- layout_geo.OffsetPosition(2, 20);
143- layout_geo.OffsetSize(-4, -22);
144- }
145-// else
146-// {
147-// layout_geo.OffsetPosition(2, 2);
148-// layout_geo.OffsetSize(-4, -4);
149-// }
150+ layout_geo.OffsetPosition(2, 20);
151+ layout_geo.OffsetSize(-4, -22);
152 view_layout_->SetGeometry(layout_geo);
153 }
154 }
155@@ -141,16 +118,8 @@
156 if (view_layout_)
157 {
158 Geometry base = view_layout_->GetGeometry();
159- //if(bCaptionAvailable)
160- {
161- base.OffsetPosition(-2, -20);
162- base.OffsetSize(4, 22);
163- }
164-// else
165-// {
166-// base.OffsetPosition(-2, -2);
167-// base.OffsetSize(4, 4);
168-// }
169+ base.OffsetPosition(-2, -20);
170+ base.OffsetSize(4, 22);
171 Area::SetGeometry(base);
172 }
173
174@@ -178,16 +147,8 @@
175 {
176 if (view_layout_)
177 {
178- //if(bCaptionAvailable)
179- {
180- view_layout_->SetBaseX(GetBaseX() + 2);
181- view_layout_->SetBaseY(GetBaseY() + 20);
182- }
183-// else
184-// {
185-// view_layout_->SetX(GetX() + 2);
186-// view_layout_->SetY(GetY() + 2);
187-// }
188+ view_layout_->SetBaseX(GetBaseX() + 2);
189+ view_layout_->SetBaseY(GetBaseY() + 20);
190 view_layout_->ComputeContentPosition(offsetX, offsetY);
191 }
192
193@@ -199,14 +160,12 @@
194 {
195 if ((name == 0) || strlen(name) == 0)
196 {
197- //bCaptionAvailable = false;
198 m_CaptionArea.SetBaseString("");
199 m_CaptionArea.SetMinimumSize(DEFAULT_WIDGET_WIDTH, PRACTICAL_WIDGET_HEIGHT);
200 m_CaptionArea.SetBaseSize(DEFAULT_WIDGET_WIDTH, PRACTICAL_WIDGET_HEIGHT);
201 }
202 else
203 {
204- //bCaptionAvailable = true;
205 m_CaptionArea.SetBaseString(name);
206 m_CaptionArea.SetMinimumSize(4 + GetSysBoldFont()->GetStringWidth(name), PRACTICAL_WIDGET_HEIGHT);
207 m_CaptionArea.SetBaseSize(4 + GetSysBoldFont()->GetStringWidth(name), PRACTICAL_WIDGET_HEIGHT);
208
209=== modified file 'Nux/GroupBox.h'
210--- Nux/GroupBox.h 2012-11-05 21:31:06 +0000
211+++ Nux/GroupBox.h 2013-11-06 14:37:31 +0000
212@@ -53,7 +53,6 @@
213 virtual long PostLayoutManagement(long LayoutResult);
214 virtual void ComputeContentPosition(float offsetX, float offsetY);
215
216- bool bCaptionAvailable;
217 BasicView m_CaptionArea;
218 Layout *m_layout;
219 };
220
221=== modified file 'Nux/GroupBox2.cpp'
222--- Nux/GroupBox2.cpp 2012-11-05 21:31:06 +0000
223+++ Nux/GroupBox2.cpp 2013-11-06 14:37:31 +0000
224@@ -36,7 +36,6 @@
225
226 GroupBox2::GroupBox2(const char *Caption, NUX_FILE_LINE_DECL)
227 : View(NUX_FILE_LINE_PARAM)
228- , bCaptionAvailable(false)
229 , m_layout(0)
230 {
231 m_CaptionArea = new BasicView(NUX_TRACKER_LOCATION);
232@@ -63,10 +62,7 @@
233
234 GetPainter().PushDrawShapeLayer(graphics_engine, layoutgeomerty, eSHAPE_CORNER_ROUND4, GROUPBOX2_HEADER_BASE_COLOR, eCornerBottomLeft | eCornerBottomRight);
235
236- //if(bCaptionAvailable)
237- {
238- GetPainter().PaintTextLineStatic(graphics_engine, GetSysBoldFont(), m_CaptionArea->GetGeometry(), m_CaptionArea->GetBaseString(), GROUPBOX2_HEADER_TEXT_COLOR);
239- }
240+ GetPainter().PaintTextLineStatic(graphics_engine, GetSysBoldFont(), m_CaptionArea->GetGeometry(), m_CaptionArea->GetBaseString(), GROUPBOX2_HEADER_TEXT_COLOR);
241
242 if (m_layout != 0)
243 {
244@@ -121,16 +117,8 @@
245 if (GetCompositionLayout())
246 {
247 Geometry layout_geo = GetGeometry();
248- //if(bCaptionAvailable)
249- {
250- layout_geo.OffsetPosition(X_MARGIN, TOP_HEADER_HEIGHT + Y_MARGIN);
251- layout_geo.OffsetSize(-2 * X_MARGIN, -TOP_HEADER_HEIGHT - 2 * Y_MARGIN);
252- }
253-// else
254-// {
255-// layout_geo.OffsetPosition(X_MARGIN, 2);
256-// layout_geo.OffsetSize(-2*X_MARGIN, -2*Y_MARGIN);
257-// }
258+ layout_geo.OffsetPosition(X_MARGIN, TOP_HEADER_HEIGHT + Y_MARGIN);
259+ layout_geo.OffsetSize(-2 * X_MARGIN, -TOP_HEADER_HEIGHT - 2 * Y_MARGIN);
260 GetCompositionLayout()->SetGeometry(layout_geo);
261 }
262 }
263@@ -147,16 +135,8 @@
264 if (GetCompositionLayout())
265 {
266 Geometry base = GetCompositionLayout()->GetGeometry();
267- //if(bCaptionAvailable)
268- {
269- base.OffsetPosition(-X_MARGIN, -TOP_HEADER_HEIGHT - Y_MARGIN);
270- base.OffsetSize(2 * X_MARGIN, TOP_HEADER_HEIGHT + 2 * Y_MARGIN);
271- }
272-// else
273-// {
274-// base.OffsetPosition(-X_MARGIN, -2);
275-// base.OffsetSize(2*X_MARGIN, 2*Y_MARGIN);
276-// }
277+ base.OffsetPosition(-X_MARGIN, -TOP_HEADER_HEIGHT - Y_MARGIN);
278+ base.OffsetSize(2 * X_MARGIN, TOP_HEADER_HEIGHT + 2 * Y_MARGIN);
279 Area::SetGeometry(base);
280 }
281
282@@ -185,16 +165,8 @@
283 {
284 if (GetCompositionLayout())
285 {
286- //if(bCaptionAvailable)
287- {
288- GetCompositionLayout()->SetBaseX(GetBaseX() + X_MARGIN);
289- GetCompositionLayout()->SetBaseY(GetBaseY() + TOP_HEADER_HEIGHT + Y_MARGIN);
290- }
291-// else
292-// {
293-// m_compositionLayout->SetX(GetX() + X_MARGIN);
294-// m_compositionLayout->SetY(GetY() + Y_MARGIN);
295-// }
296+ GetCompositionLayout()->SetBaseX(GetBaseX() + X_MARGIN);
297+ GetCompositionLayout()->SetBaseY(GetBaseY() + TOP_HEADER_HEIGHT + Y_MARGIN);
298 GetCompositionLayout()->ComputeContentPosition(offsetX, offsetY);
299 }
300
301@@ -206,14 +178,12 @@
302 {
303 if ((Caption == 0) || (StringLength(Caption) == 0))
304 {
305- //bCaptionAvailable = false;
306 m_CaptionArea->SetBaseString("");
307 m_CaptionArea->SetMinimumSize(DEFAULT_WIDGET_WIDTH, PRACTICAL_WIDGET_HEIGHT);
308 m_CaptionArea->SetBaseSize(DEFAULT_WIDGET_WIDTH, PRACTICAL_WIDGET_HEIGHT);
309 }
310 else
311 {
312- //bCaptionAvailable = true;
313 m_CaptionArea->SetBaseString(Caption);
314 m_CaptionArea->SetMinimumSize(4 + GetSysBoldFont()->GetStringWidth(Caption), PRACTICAL_WIDGET_HEIGHT);
315 m_CaptionArea->SetBaseSize(4 + GetSysBoldFont()->GetStringWidth(Caption), PRACTICAL_WIDGET_HEIGHT);
316
317=== modified file 'Nux/GroupBox2.h'
318--- Nux/GroupBox2.h 2012-11-05 21:31:06 +0000
319+++ Nux/GroupBox2.h 2013-11-06 14:37:31 +0000
320@@ -52,7 +52,6 @@
321 virtual long PostLayoutManagement(long LayoutResult);
322 virtual void ComputeContentPosition(float offsetX, float offsetY);
323
324- bool bCaptionAvailable;
325 BasicView *m_CaptionArea;
326 Layout *m_layout;
327
328
329=== modified file 'Nux/HSplitter.cpp'
330--- Nux/HSplitter.cpp 2013-04-08 14:02:32 +0000
331+++ Nux/HSplitter.cpp 2013-11-06 14:37:31 +0000
332@@ -620,7 +620,7 @@
333 return NULL;
334 }
335
336- if ((direction == KEY_NAV_UP))
337+ if (direction == KEY_NAV_UP)
338 {
339 --it;
340 Area* key_nav_focus = (*it)->KeyNavIteration(direction);
341@@ -637,7 +637,7 @@
342 return key_nav_focus;
343 }
344
345- if ((direction == KEY_NAV_DOWN))
346+ if (direction == KEY_NAV_DOWN)
347 {
348 ++it;
349 Area* key_nav_focus = (*it)->KeyNavIteration(direction);
350
351=== modified file 'Nux/InputArea.cpp'
352--- Nux/InputArea.cpp 2012-11-20 22:13:38 +0000
353+++ Nux/InputArea.cpp 2013-11-06 14:37:31 +0000
354@@ -38,7 +38,7 @@
355
356 namespace nux
357 {
358-DECLARE_LOGGER(logger, "nux.inputarea");
359+ DECLARE_LOGGER(logger, "nux.inputarea");
360
361 NUX_IMPLEMENT_OBJECT_TYPE(InputArea);
362
363
364=== modified file 'Nux/KeyboardHandler.cpp'
365--- Nux/KeyboardHandler.cpp 2012-10-10 23:49:53 +0000
366+++ Nux/KeyboardHandler.cpp 2013-11-06 14:37:31 +0000
367@@ -546,13 +546,13 @@
368 UnselectAllText();
369 }
370
371- if ((virtual_code == NUX_VK_ESCAPE))
372+ if (virtual_code == NUX_VK_ESCAPE)
373 {
374 // If Text is selected, Unselect
375 UnselectAllText();
376 }
377
378- if ((virtual_code == NUX_VK_ENTER))
379+ if (virtual_code == NUX_VK_ENTER)
380 {
381 SelectAllText();
382 }
383@@ -680,7 +680,7 @@
384 {
385 return virtual_code;
386 }
387- else if ((virtual_code == NUX_VK_ENTER))
388+ else if (virtual_code == NUX_VK_ENTER)
389 {
390 return virtual_code;
391 }
392
393=== modified file 'Nux/LayeredLayout.cpp'
394--- Nux/LayeredLayout.cpp 2012-11-05 21:31:06 +0000
395+++ Nux/LayeredLayout.cpp 2013-11-06 14:37:31 +0000
396@@ -106,7 +106,7 @@
397 }
398 else
399 {
400- props = NULL;
401+ props = 0;
402 }
403
404 if (props && props->m_expand)
405@@ -239,7 +239,8 @@
406 unsigned int /* stretch_factor */,
407 MinorDimensionPosition /* positioning */,
408 MinorDimensionSize /* extend */,
409- float /* percentage */)
410+ float /* percentage */,
411+ LayoutPosition /* position */)
412 {
413 AddLayer(layout);
414 }
415@@ -248,7 +249,8 @@
416 unsigned int /* stretch_factor */,
417 MinorDimensionPosition /* positioning */,
418 MinorDimensionSize /* extend */,
419- float /* percentage */)
420+ float /* percentage */,
421+ LayoutPosition /* position */)
422 {
423 AddLayer(view);
424 }
425@@ -323,10 +325,10 @@
426 }
427 else
428 {
429- props = NULL;
430+ props = 0;
431 }
432
433- if (props == NULL)
434+ if (props == 0)
435 return;
436
437 props->Update(expand, x, y, width, height);
438
439=== modified file 'Nux/LayeredLayout.h'
440--- Nux/LayeredLayout.h 2012-04-10 00:58:09 +0000
441+++ Nux/LayeredLayout.h 2013-11-06 14:37:31 +0000
442@@ -212,12 +212,14 @@
443 unsigned int stretch_factor = 1,
444 MinorDimensionPosition position = eAbove,
445 MinorDimensionSize extend = eFull,
446- float percentage = 100.0f);
447+ float percentage = 100.0f,
448+ LayoutPosition = NUX_LAYOUT_END);
449 void AddView(Area *view,
450 unsigned int stretch_factor = 1,
451 MinorDimensionPosition positioning = eAbove,
452 MinorDimensionSize extend = eFull,
453- float percentage = 100.0f);
454+ float percentage = 100.0f,
455+ LayoutPosition = NUX_LAYOUT_END);
456 void RemoveChildObject(Area *area);
457 void Clear();
458
459
460=== modified file 'Nux/MainLoopGLib.cpp'
461--- Nux/MainLoopGLib.cpp 2013-02-01 13:09:25 +0000
462+++ Nux/MainLoopGLib.cpp 2013-11-06 14:37:31 +0000
463@@ -13,7 +13,7 @@
464
465 namespace nux
466 {
467-DECLARE_LOGGER(logger, "nux.windows.thread");
468+ DECLARE_LOGGER(logger, "nux.windows.thread");
469
470 #if (defined(NUX_OS_LINUX) || defined(NUX_USE_GLIB_LOOP_ON_WINDOWS)) && (!defined(NUX_DISABLE_GLIB_LOOP))
471
472
473=== modified file 'Nux/RGBValuator.h'
474--- Nux/RGBValuator.h 2012-11-05 21:31:06 +0000
475+++ Nux/RGBValuator.h 2013-11-06 14:37:31 +0000
476@@ -119,13 +119,13 @@
477 /*!
478 Prevent changing the minimum height of the RGBValuator view.
479 */
480- virtual void SetMinimumHeight(){};
481+ virtual void SetMinimumHeight(int h){};
482
483 //! Override of Area::SetMaximumHeight and made private.
484 /*!
485 Prevent changing the maximum height of the RGBValuator view.
486 */
487- virtual void SetMaximumHeight(){};
488+ virtual void SetMaximumHeight(int h){};
489
490 void DrawRedMarker(GraphicsEngine &graphics_engine);
491 void DrawGreenMarker(GraphicsEngine &graphics_engine);
492
493=== modified file 'Nux/RadioButton.h'
494--- Nux/RadioButton.h 2012-01-17 04:34:19 +0000
495+++ Nux/RadioButton.h 2013-11-06 14:37:31 +0000
496@@ -88,13 +88,13 @@
497 /*!
498 Prevent changing the minimum height of the StaticText view.
499 */
500- virtual void SetMinimumHeight(){};
501+ virtual void SetMinimumHeight(int h){};
502
503 //! Override of Area::SetMaximumHeight and made private.
504 /*!
505 Prevent changing the maximum height of the StaticText view.
506 */
507- virtual void SetMaximumHeight(){};
508+ virtual void SetMaximumHeight(int h){};
509
510 friend class RadioButtonGroup;
511 };
512
513=== modified file 'Nux/StaticText.h'
514--- Nux/StaticText.h 2012-02-08 02:00:19 +0000
515+++ Nux/StaticText.h 2013-11-06 14:37:31 +0000
516@@ -206,13 +206,13 @@
517 /*!
518 Prevent changing the minimum height of the StaticText view.
519 */
520- virtual void SetMinimumHeight(){};
521+ virtual void SetMinimumHeight(int h){};
522
523 //! Override of Area::SetMaximumHeight and made private.
524 /*!
525 Prevent changing the maximum height of the StaticText view.
526 */
527- virtual void SetMaximumHeight(){};
528+ virtual void SetMaximumHeight(int h){};
529
530 //! Compute the full text size.
531 /*!
532
533=== modified file 'Nux/StaticTextBox.h'
534--- Nux/StaticTextBox.h 2012-10-10 22:46:50 +0000
535+++ Nux/StaticTextBox.h 2013-11-06 14:37:31 +0000
536@@ -55,7 +55,7 @@
537 //! Return true if the widget with changes to match the text width.
538 bool GetMinWidthMatchText() const;
539
540- void SetTextColor(Color color)
541+ void SetTextColor(const Color &color)
542 {
543 m_TextColor = color;
544 };
545
546=== modified file 'Nux/TextEntry.cpp'
547--- Nux/TextEntry.cpp 2013-05-06 19:48:34 +0000
548+++ Nux/TextEntry.cpp 2013-11-06 14:37:31 +0000
549@@ -241,7 +241,7 @@
550 return result;
551 }
552
553- void TextEntry::GeometryChanged()
554+ void TextEntry::GeometryChanged(bool /*position_has_changed*/, bool /*size_has_changed*/)
555 {
556 update_canvas_ = true;
557 View::GeometryChanged(true, true);
558@@ -825,7 +825,7 @@
559 }
560 }
561
562- Color const& TextEntry::GetTextColor() const
563+ Color TextEntry::GetTextColor() const
564 {
565 return _text_color;
566 }
567
568=== modified file 'Nux/TextEntry.h'
569--- Nux/TextEntry.h 2013-05-06 19:48:34 +0000
570+++ Nux/TextEntry.h 2013-11-06 14:37:31 +0000
571@@ -154,7 +154,7 @@
572 Color const& GetCompletionColor() const;
573
574 void SetTextColor(const Color& color);
575- Color const& GetTextColor() const;
576+ Color GetTextColor() const;
577 void SetFontFamily(const char* font);
578 void SetFontSize(double font_size);
579 void SetFontOptions(const cairo_font_options_t* options);
580@@ -230,7 +230,7 @@
581 protected:
582 bool _block_focus; // used to selectively ignore focus keyevents
583
584- virtual void GeometryChanged();
585+ virtual void GeometryChanged(bool position_has_changed, bool size_has_changed);
586
587 /**
588 * Enum used to specify different motion types.
589
590=== modified file 'Nux/ToolButton.h'
591--- Nux/ToolButton.h 2012-10-02 07:32:55 +0000
592+++ Nux/ToolButton.h 2013-11-06 14:37:31 +0000
593@@ -57,8 +57,6 @@
594 virtual void DrawContent(GraphicsEngine &GfxContext, bool force_draw);
595
596 private:
597- HLayout *hlayout;
598- InputArea *m_IconArea;
599 ActionItem *m_ActionItem;
600 BaseTexture *m_Texture;
601
602
603=== modified file 'Nux/VSplitter.cpp'
604--- Nux/VSplitter.cpp 2013-04-08 14:02:32 +0000
605+++ Nux/VSplitter.cpp 2013-11-06 14:37:31 +0000
606@@ -616,7 +616,7 @@
607 return NULL;
608 }
609
610- if ((direction == KEY_NAV_LEFT))
611+ if (direction == KEY_NAV_LEFT)
612 {
613 --it;
614 Area* key_nav_focus = (*it)->KeyNavIteration(direction);
615@@ -633,7 +633,7 @@
616 return key_nav_focus;
617 }
618
619- if ((direction == KEY_NAV_RIGHT))
620+ if (direction == KEY_NAV_RIGHT)
621 {
622 ++it;
623 Area* key_nav_focus = (*it)->KeyNavIteration(direction);
624
625=== modified file 'Nux/View.cpp'
626--- Nux/View.cpp 2013-04-14 06:07:53 +0000
627+++ Nux/View.cpp 2013-11-06 14:37:31 +0000
628@@ -614,7 +614,7 @@
629 m_TextColor = color;
630 }
631
632- Color View::GetTextColor()
633+ Color View::GetTextColor() const
634 {
635 return m_TextColor;
636 }
637
638=== modified file 'Nux/View.h'
639--- Nux/View.h 2012-11-05 21:31:06 +0000
640+++ Nux/View.h 2013-11-06 14:37:31 +0000
641@@ -121,7 +121,7 @@
642 }
643
644 virtual void SetTextColor(const Color &color);
645- virtual Color GetTextColor();
646+ virtual Color GetTextColor() const;
647
648 //! Get the default layout of this view.
649 /*!
650
651=== modified file 'NuxCore/NumberConversion.cpp'
652--- NuxCore/NumberConversion.cpp 2012-09-21 02:14:12 +0000
653+++ NuxCore/NumberConversion.cpp 2013-11-06 14:37:31 +0000
654@@ -38,9 +38,7 @@
655 // check that the base if valid
656 if (base < 2 || base > 36)
657 {
658- //*result = '\0';
659- std::string str = TEXT ('\0');
660- return str;
661+ return std::string();
662 }
663
664 char *ptr = result, *ptr1 = result, tmp_char;
665
666=== modified file 'NuxCore/TextString.h'
667--- NuxCore/TextString.h 2012-10-10 22:46:50 +0000
668+++ NuxCore/TextString.h 2013-11-06 14:37:31 +0000
669@@ -475,7 +475,8 @@
670 #if defined(NUX_OS_WINDOWS)
671 size_t res = _snscanf_s (buffer, bufferlen, format, &value);
672 #elif defined(NUX_OS_LINUX)
673- bufferlen = bufferlen; // Stop unused param warning in release mode.
674+ bufferlen = 0; // Stop unused param warning in release mode.
675+ bufferlen = bufferlen + (1 - 1); // Stop unused param warning in release mode.
676 size_t res = sscanf (buffer, format, &value);
677 #endif
678
679
680=== modified file 'NuxGraphics/GLPBuffer.h'
681--- NuxGraphics/GLPBuffer.h 2011-05-04 00:24:29 +0000
682+++ NuxGraphics/GLPBuffer.h 2013-11-06 14:37:31 +0000
683@@ -167,7 +167,6 @@
684 #if defined(NUX_OS_WINDOWS) || defined(NUX_OS_LINUX)
685 void parseModeString (const char *modeString, std::vector<int> *pfAttribList, std::vector<int> *pbAttribList);
686
687- bool m_bIsBound;
688 bool m_bIsActive;
689 bool m_bManaged;
690 #endif
691
692=== modified file 'NuxGraphics/GLSh_ColorPicker.h'
693--- NuxGraphics/GLSh_ColorPicker.h 2012-10-14 01:00:34 +0000
694+++ NuxGraphics/GLSh_ColorPicker.h 2013-11-06 14:37:31 +0000
695@@ -49,11 +49,6 @@
696 #ifndef NUX_OPENGLES_20
697 ObjectPtr<IOpenGLAsmShaderProgram> m_AsmProg;
698 #endif
699-
700- UINT ViewPortX;
701- UINT ViewPortY;
702- UINT ViewPortWidth;
703- UINT ViewPortHeight;
704 };
705
706 }
707
708=== modified file 'NuxGraphics/GLSh_DrawFunction.h'
709--- NuxGraphics/GLSh_DrawFunction.h 2012-10-14 01:00:34 +0000
710+++ NuxGraphics/GLSh_DrawFunction.h 2013-11-06 14:37:31 +0000
711@@ -53,14 +53,7 @@
712 #endif
713
714 float _ScreenOffsetX, _ScreenOffsetY;
715- UINT ViewPortX;
716- UINT ViewPortY;
717- UINT ViewPortWidth;
718- UINT ViewPortHeight;
719 ObjectPtr<IOpenGLBaseTexture> m_device_texture;
720-
721- private:
722- TemplateQuadBuffer *m_QuadBuffer;
723 };
724 }
725
726
727=== modified file 'NuxGraphics/GLTextureResourceManager.cpp'
728--- NuxGraphics/GLTextureResourceManager.cpp 2013-07-03 23:12:13 +0000
729+++ NuxGraphics/GLTextureResourceManager.cpp 2013-11-06 14:37:31 +0000
730@@ -766,9 +766,9 @@
731
732 for (int face = CUBEMAP_FACE_POSITIVE_X; face < GL_TEXTURE_CUBE_MAP_NEGATIVE_Z + 1; face++)
733 {
734- OGL_CALL( CubemapTexture->LockRect(eCUBEMAP_FACES(face), MipLevel, &LockedRect, NULL));
735+ OGL_CALL( CubemapTexture->CubeLockRect(eCUBEMAP_FACES(face), MipLevel, &LockedRect, NULL));
736 SourceTexture->GetData(LockedRect.pBits, MipLevel, LockedRect.Pitch, face - CUBEMAP_FACE_POSITIVE_X);
737- OGL_CALL( CubemapTexture->UnlockRect(eCUBEMAP_FACES(face), MipLevel ));
738+ OGL_CALL( CubemapTexture->CubeUnlockRect(eCUBEMAP_FACES(face), MipLevel ));
739 }
740 }
741
742
743=== modified file 'NuxGraphics/GpuDevice.cpp'
744--- NuxGraphics/GpuDevice.cpp 2013-05-03 22:55:16 +0000
745+++ NuxGraphics/GpuDevice.cpp 2013-11-06 14:37:31 +0000
746@@ -367,7 +367,7 @@
747 #ifndef NUX_OPENGLES_20
748 // OpenGL extension initialization
749 GLenum Glew_Ok = 0;
750- Glew_Ok = Glew_Ok; // Suppress compiler warning about set but not used variable.
751+ Glew_Ok = Glew_Ok + (1 - 1); // Suppress compiler warning about set but not used variable.
752 #ifdef GLEW_MX
753 Glew_Ok = glewContextInit(glewGetContext());
754 nuxAssertMsg(Glew_Ok == GLEW_OK, "[GpuDevice::GpuDevice] GL Extensions failed to initialize.");
755
756=== modified file 'NuxGraphics/IOpenGLCubeTexture.cpp'
757--- NuxGraphics/IOpenGLCubeTexture.cpp 2012-09-26 06:44:12 +0000
758+++ NuxGraphics/IOpenGLCubeTexture.cpp 2013-11-06 14:37:31 +0000
759@@ -100,7 +100,7 @@
760 return 1;
761 }
762
763- int IOpenGLCubeTexture::LockRect(
764+ int IOpenGLCubeTexture::CubeLockRect(
765 eCUBEMAP_FACES FaceType,
766 int Level,
767 SURFACE_LOCKED_RECT *pLockedRect,
768@@ -128,7 +128,7 @@
769 return OGL_OK;
770 }
771
772- int IOpenGLCubeTexture::UnlockRect(
773+ int IOpenGLCubeTexture::CubeUnlockRect(
774 eCUBEMAP_FACES FaceType,
775 int Level
776 )
777
778=== modified file 'NuxGraphics/IOpenGLCubeTexture.h'
779--- NuxGraphics/IOpenGLCubeTexture.h 2011-10-19 20:32:38 +0000
780+++ NuxGraphics/IOpenGLCubeTexture.h 2013-11-06 14:37:31 +0000
781@@ -40,13 +40,13 @@
782 IOpenGLSurface **ppCubeMapSurface
783 );
784
785- int LockRect(
786+ int CubeLockRect(
787 eCUBEMAP_FACES FaceType,
788 int Level,
789 SURFACE_LOCKED_RECT *pLockedRect,
790 const SURFACE_RECT *pRect);
791
792- int UnlockRect(
793+ int CubeUnlockRect(
794 eCUBEMAP_FACES FaceType,
795 int Level
796 );
797
798=== modified file 'NuxGraphics/IOpenGLVolumeTexture.cpp'
799--- NuxGraphics/IOpenGLVolumeTexture.cpp 2011-10-21 22:06:35 +0000
800+++ NuxGraphics/IOpenGLVolumeTexture.cpp 2013-11-06 14:37:31 +0000
801@@ -97,7 +97,7 @@
802 GRunTimeStats.UnRegister(this);
803 }
804
805- int IOpenGLVolumeTexture::LockRect(
806+ int IOpenGLVolumeTexture::VolumeLockRect(
807 int Slice,
808 int Level,
809 SURFACE_LOCKED_RECT *pLockedRect,
810@@ -130,7 +130,7 @@
811 return OGL_OK;
812 }
813
814- int IOpenGLVolumeTexture::UnlockRect(
815+ int IOpenGLVolumeTexture::VolumeUnlockRect(
816 int Slice,
817 int Level
818 )
819
820=== modified file 'NuxGraphics/IOpenGLVolumeTexture.h'
821--- NuxGraphics/IOpenGLVolumeTexture.h 2011-10-19 20:32:38 +0000
822+++ NuxGraphics/IOpenGLVolumeTexture.h 2013-11-06 14:37:31 +0000
823@@ -39,13 +39,13 @@
824 IOpenGLVolume **ppVolumeLevel
825 );
826
827- int LockRect(
828+ int VolumeLockRect(
829 int Slice,
830 int Level,
831 SURFACE_LOCKED_RECT *pLockedRect,
832 const SURFACE_RECT *pRect);
833
834- int UnlockRect(
835+ int VolumeUnlockRect(
836 int Slice,
837 int Level
838 );
839
840=== modified file 'NuxGraphics/ImageSurface.h'
841--- NuxGraphics/ImageSurface.h 2013-04-08 00:04:18 +0000
842+++ NuxGraphics/ImageSurface.h 2013-11-06 14:37:31 +0000
843@@ -54,9 +54,6 @@
844 }
845
846 void GetSize() {};
847-
848- private:
849- void *m_RawDataPtr;
850 };
851
852 struct DXTColBlock
853
854=== modified file 'tools/unity_support_test.c'
855--- tools/unity_support_test.c 2013-09-17 18:12:50 +0000
856+++ tools/unity_support_test.c 2013-11-06 14:37:31 +0000
857@@ -262,7 +262,7 @@
858 {
859 // Check for XComposite
860 int composite_major, composite_minor;
861- unsigned int composite_tmp;
862+ int composite_tmp;
863
864 if (!XQueryExtension (display, COMPOSITE_NAME, &composite_tmp, &composite_tmp, &composite_tmp))
865 {
866@@ -512,7 +512,7 @@
867 TestResults *results)
868 {
869 // Fill flags with the supported OpenGL extensions.
870- const char* gl_extensions = glGetString (GL_EXTENSIONS);
871+ const char* gl_extensions = (char*)glGetString (GL_EXTENSIONS);
872 if (gl_extensions == NULL) {
873 results->error = strdup ("invalid OpenGL extensions string");
874 results->result = 1;
875@@ -547,17 +547,17 @@
876 if (is_extension_supported (glx_extensions, glx_extension[i].name) == 1)
877 results->flags |= glx_extension[i].flag;
878 if (results->flags & FLAG_GLX_SGIX_FBCONFIG) {
879- if (glXGetProcAddressARB ("glXQueryDrawable") == NULL ||
880- glXGetProcAddressARB ("glXGetFBConfigs") == NULL ||
881- glXGetProcAddressARB ("glXGetFBConfigAttrib") == NULL ||
882- glXGetProcAddressARB ("glXCreatePixmap") == NULL ||
883- glXGetProcAddressARB ("glXDestroyPixmap") == NULL) {
884+ if (glXGetProcAddressARB ((unsigned char*)"glXQueryDrawable") == NULL ||
885+ glXGetProcAddressARB ((unsigned char*)"glXGetFBConfigs") == NULL ||
886+ glXGetProcAddressARB ((unsigned char*)"glXGetFBConfigAttrib") == NULL ||
887+ glXGetProcAddressARB ((unsigned char*)"glXCreatePixmap") == NULL ||
888+ glXGetProcAddressARB ((unsigned char*)"glXDestroyPixmap") == NULL) {
889 results->flags &= ~FLAG_GLX_SGIX_FBCONFIG;
890 }
891 }
892 if (results->flags & FLAG_GLX_EXT_TEXTURE_FROM_PIXMAP) {
893- if (glXGetProcAddressARB ("glXBindTexImageEXT") == NULL ||
894- glXGetProcAddressARB ("glXReleaseTexImageEXT") == NULL) {
895+ if (glXGetProcAddressARB ((unsigned char*)"glXBindTexImageEXT") == NULL ||
896+ glXGetProcAddressARB ((unsigned char*)"glXReleaseTexImageEXT") == NULL) {
897 results->flags &= ~FLAG_GLX_EXT_TEXTURE_FROM_PIXMAP;
898 }
899 }

Subscribers

People subscribed via source and target branches