libglui / glui

GLUI is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, using GLUT or FreeGLUT.
Other
194 stars 82 forks source link

Fix in glui.h #36

Closed josch closed 7 years ago

josch commented 8 years ago

https://sourceforge.net/p/glui/patches/12/

Line 944 in glui.h should read

last_live_text = "";

rather than

last_live_text == "";

The existing line generates a compiler warning for an unused value on some compilers, e.g. Clang 3.1. A patch is attached.

diff --git a/src/include/GL/glui.h b/src/include/GL/glui.h
index 01a5c75..5784e29 100644
--- a/src/include/GL/glui.h
+++ b/src/include/GL/glui.h
@@ -941,7 +941,7 @@ public:
         spacebar_mouse_click = true;    /* Does spacebar simulate a mouse click? */
         live_type      = GLUI_LIVE_NONE;
         text = "";
-        last_live_text == "";
+        last_live_text = "";
         live_inited    = false;
         collapsible    = false;
         is_open        = true;
nigels-com commented 7 years ago

Fixed, thanks.