mirror of https://github.com/fltk/fltk
Fix trailing comma in enums of public headers
Compiler warning: comma at end of enumerator list [-Wpedantic] Note 1: I decided to fix these warnings although trailing commas in enums are allowed at least since C++11. Note 2: I fixed only public headers because these headers may be compiled in user code. To do: check internal headers.
This commit is contained in:
parent
9d380f24bd
commit
7b2c770ef7
|
@ -455,7 +455,7 @@ enum Fl_Callback_Reason {
|
|||
FL_REASON_CHANGED, ///< the value of the widget was modified
|
||||
FL_REASON_GOT_FOCUS, ///< a widget received focus
|
||||
FL_REASON_LOST_FOCUS, ///< a widget lost focus
|
||||
FL_REASON_RELEASED, ///< the mouse button was released
|
||||
FL_REASON_RELEASED ///< the mouse button was released
|
||||
};
|
||||
/**@}*/ // group: Callback Reasons
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// Preferences implementation for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 2002-2022 by Matthias Melcher.
|
||||
// Copyright 2002-2023 by Matthias Melcher.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
|
@ -137,7 +137,7 @@ public:
|
|||
CORE_SYSTEM_L = CORE | SYSTEM_L, ///< Same as CORE | SYSTEM | C_LOCALE
|
||||
CORE_USER_L = CORE | USER_L, ///< Same as CORE | USER | C_LOCALE
|
||||
CORE_SYSTEM = CORE | SYSTEM, ///< Deprecated, same as CORE | SYSTEM. Use CORE_SYSTEM_L instead.
|
||||
CORE_USER = CORE | USER, ///< Deprecated, same as CORE | USER. Use CORE_USER_L instead.
|
||||
CORE_USER = CORE | USER ///< Deprecated, same as CORE | USER. Use CORE_USER_L instead.
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -151,7 +151,7 @@ private:
|
|||
int _selecting;
|
||||
int _scrollbar_size;
|
||||
enum {
|
||||
TABCELLNAV = 1<<0, ///> tab cell navigation flag
|
||||
TABCELLNAV = 1<<0 ///> tab cell navigation flag
|
||||
};
|
||||
unsigned int flags_;
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ public:
|
|||
OVERFLOW_COMPRESS = 0,
|
||||
OVERFLOW_CLIP,
|
||||
OVERFLOW_PULLDOWN,
|
||||
OVERFLOW_DRAG,
|
||||
OVERFLOW_DRAG
|
||||
};
|
||||
|
||||
void handle_overflow(int ov);
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
ATTR_GRAMMAR = 0x0008, ///< grammar suggestion (blue dotted underline)
|
||||
ATTR_SPELLING = 0x000C, ///< spelling suggestion (red dotted underline)
|
||||
ATTR_STRIKE_THROUGH = 0x0010, ///< line through the middle of the text
|
||||
ATTR_LINES_MASK = 0x001C, ///< the mask for all underline and strike through types
|
||||
ATTR_LINES_MASK = 0x001C ///< the mask for all underline and strike through types
|
||||
};
|
||||
|
||||
Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0);
|
||||
|
|
|
@ -48,7 +48,7 @@ class FL_EXPORT Fl_Tree_Item_Array {
|
|||
int _size; // #items *allocated* for array
|
||||
int _chunksize; // #items to enlarge mem allocation
|
||||
enum {
|
||||
MANAGE_ITEM = 1, ///> manage the Fl_Tree_Item's internals (internal use only)
|
||||
MANAGE_ITEM = 1 ///> manage the Fl_Tree_Item's internals (internal use only)
|
||||
};
|
||||
char _flags; // flags to control behavior
|
||||
void enlarge(int count);
|
||||
|
|
|
@ -77,7 +77,7 @@ enum Fl_Tree_Select {
|
|||
///
|
||||
enum Fl_Tree_Item_Reselect_Mode {
|
||||
FL_TREE_SELECTABLE_ONCE=0, ///< Item can only be selected once (default)
|
||||
FL_TREE_SELECTABLE_ALWAYS, ///< Enables FL_TREE_REASON_RESELECTED events for callbacks
|
||||
FL_TREE_SELECTABLE_ALWAYS ///< Enables FL_TREE_REASON_RESELECTED events for callbacks
|
||||
};
|
||||
|
||||
/// \enum Fl_Tree_Item_Draw_Mode
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef _FL_fl_casts_H_
|
||||
#define _FL_fl_casts_H_
|
||||
|
||||
#include <FL/platform_types.h>
|
||||
|
||||
inline char fl_char(void *v) { return (char)(fl_intptr_t)v; }
|
||||
|
@ -32,3 +35,5 @@ inline void *fl_voidptr(int v) { return (void *)(fl_intptr_t)v; }
|
|||
inline void *fl_voidptr(unsigned int v) { return (void *)(fl_uintptr_t)v; }
|
||||
inline void *fl_voidptr(long v) { return (void *)(fl_intptr_t)v; }
|
||||
inline void *fl_voidptr(unsigned long v) { return (void *)(fl_uintptr_t)v; }
|
||||
|
||||
#endif /* _FL_fl_casts_H_ */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// Standard message header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
// Copyright 1998-2023 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
|
@ -14,4 +14,9 @@
|
|||
// https://www.fltk.org/bugs.php
|
||||
//
|
||||
|
||||
#ifndef _FL_fl_message_H_
|
||||
#define _FL_fl_message_H_
|
||||
|
||||
#include "fl_ask.H"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _FL_gl2opengl_h_
|
||||
#define _FL_gl2opengl_h_
|
||||
|
||||
#include <FL/gl.h>
|
||||
#include "gl_draw.H"
|
||||
|
||||
|
@ -33,3 +36,5 @@ inline void recti(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);}
|
|||
inline void rectfi(int x,int y,int r,int t) {glRecti(x,y,r+1,t+1);}
|
||||
inline void rects(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);}
|
||||
inline void rectfs(int x,int y,int r,int t) {glRects(x,y,r+1,t+1);}
|
||||
|
||||
#endif /* _FL_gl2opengl_h_ */
|
||||
|
|
10
FL/glut.H
10
FL/glut.H
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// GLUT emulation header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
// Copyright 1998-2023 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
|
@ -26,8 +26,8 @@
|
|||
|
||||
// Commented out lines indicate parts of GLUT that are not emulated.
|
||||
|
||||
#ifndef Fl_glut_H
|
||||
# define Fl_glut_H
|
||||
#ifndef _FL_glut_H_
|
||||
# define _FL_glut_H_
|
||||
|
||||
# include "gl.h"
|
||||
|
||||
|
@ -320,7 +320,7 @@ enum {
|
|||
//GLUT_WINDOW_CURSOR,
|
||||
//GLUT_SCREEN_WIDTH_MM,
|
||||
//GLUT_SCREEN_HEIGHT_MM,
|
||||
GLUT_ELAPSED_TIME,
|
||||
GLUT_ELAPSED_TIME
|
||||
};
|
||||
|
||||
# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS
|
||||
|
@ -472,4 +472,4 @@ FL_EXPORT void glutSolidTetrahedron();
|
|||
FL_EXPORT void glutWireIcosahedron();
|
||||
FL_EXPORT void glutSolidIcosahedron();
|
||||
|
||||
#endif // !Fl_glut_H
|
||||
#endif // !_FL_glut_H_
|
||||
|
|
Loading…
Reference in New Issue