summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-08-27 14:52:43 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-08-27 14:52:43 +0200
commit6ac305a50804498b8c7ab00d23d2d4f3164b84fa (patch)
tree9093bd58f0babd89ce55a45cee7e53d5029a1e14 /FL
parent23c54e7a4b82fe325d74a181060535b60243208d (diff)
Remove compiler warnings '-Wextra-semi' (see also PR #266)
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows (cross-compiled on Linux) and removed all "extra semicolon" warnings I could find. I didn't check on macOS (yet). Note: Linux configured with and w/o Pango but not w/o Xft. Compilation with other options (e.g. Cairo) might still emit such warnings.
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Device.H6
-rw-r--r--FL/Fl_File_Browser.H14
-rw-r--r--FL/Fl_File_Chooser.H2
-rw-r--r--FL/Fl_Paged_Device.H4
-rw-r--r--FL/Fl_SVG_Image.H2
5 files changed, 14 insertions, 14 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 9615bdc44..58f391c8d 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -73,19 +73,19 @@ protected:
/** Constructor that sets the graphics driver to use for the created surface. */
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }
/** Sets the graphics driver of this drawing surface. */
- inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;};
+ inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;}
public:
virtual void set_current(void);
virtual bool is_current();
/** \brief Returns the graphics driver of this drawing surface. */
- inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; };
+ inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; }
/** The current drawing surface.
In other words, the Fl_Surface_Device object that currently receives all graphics requests.
\note It's possible to transiently remove the GUI scaling factor in place in the current
drawing surface with \ref fl_override_scale(). */
static inline Fl_Surface_Device *surface() {
return surface_ ? surface_ : default_surface();
- };
+ }
/** \brief The destructor. */
virtual ~Fl_Surface_Device();
static void push_current(Fl_Surface_Device *new_current);
diff --git a/FL/Fl_File_Browser.H b/FL/Fl_File_Browser.H
index 40d328093..8ea51b2ad 100644
--- a/FL/Fl_File_Browser.H
+++ b/FL/Fl_File_Browser.H
@@ -55,9 +55,9 @@ public:
~Fl_File_Browser();
/** Sets or gets the size of the icons. The default size is 20 pixels. */
- uchar iconsize() const { return (iconsize_); };
+ uchar iconsize() const { return (iconsize_); }
/** Sets or gets the size of the icons. The default size is 20 pixels. */
- void iconsize(uchar s) { iconsize_ = s; redraw(); };
+ void iconsize(uchar s) { iconsize_ = s; redraw(); }
/**
Sets or gets the filename filter. The pattern matching uses
@@ -70,10 +70,10 @@ public:
the fl_filename_match()
function in FLTK.
*/
- const char *filter() const { return (pattern_); };
+ const char *filter() const { return (pattern_); }
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
- Fl_Fontsize textsize() const { return Fl_Browser::textsize(); };
- void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
+ Fl_Fontsize textsize() const { return Fl_Browser::textsize(); }
+ void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }
/**
Sets or gets the file browser type, FILES or
@@ -81,14 +81,14 @@ public:
files and directories are shown. Otherwise only directories are
shown.
*/
- int filetype() const { return (filetype_); };
+ int filetype() const { return (filetype_); }
/**
Sets or gets the file browser type, FILES or
DIRECTORIES. When set to FILES, both
files and directories are shown. Otherwise only directories are
shown.
*/
- void filetype(int t) { filetype_ = t; };
+ void filetype(int t) { filetype_ = t; }
void errmsg(const char *emsg);
/**
Returns OS error messages, or NULL if none. Use when advised.
diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H
index 5935edc28..57e0a97f9 100644
--- a/FL/Fl_File_Chooser.H
+++ b/FL/Fl_File_Chooser.H
@@ -142,7 +142,7 @@ public:
void ok_label(const char *l);
const char * ok_label();
void preview(int e);
- int preview() const { return previewButton->value(); };
+ int preview() const { return previewButton->value(); }
private:
void showHidden(int e);
void remove_hidden_files();
diff --git a/FL/Fl_Paged_Device.H b/FL/Fl_Paged_Device.H
index 16b41244c..cec476637 100644
--- a/FL/Fl_Paged_Device.H
+++ b/FL/Fl_Paged_Device.H
@@ -36,7 +36,7 @@
class FL_EXPORT Fl_Paged_Device : public Fl_Widget_Surface {
protected:
/** \brief The constructor */
- Fl_Paged_Device() : Fl_Widget_Surface(NULL) {};
+ Fl_Paged_Device() : Fl_Widget_Surface(NULL) {}
public:
/**
Possible page formats.
@@ -99,7 +99,7 @@ public:
*/
static const page_format page_formats[NO_PAGE_FORMATS];
/** \brief The destructor */
- virtual ~Fl_Paged_Device() {};
+ virtual ~Fl_Paged_Device() {}
virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL);
/** Synonym of begin_job(int pagecount, int *frompage, int *topage, char **perr_message).
For API compatibility with FLTK 1.3.x */
diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H
index 5fec92274..2f98a2a46 100644
--- a/FL/Fl_SVG_Image.H
+++ b/FL/Fl_SVG_Image.H
@@ -162,7 +162,7 @@ public:
virtual void color_average(Fl_Color c, float i);
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
- virtual Fl_SVG_Image *as_svg_image() { return this; };
+ virtual Fl_SVG_Image *as_svg_image() { return this; }
virtual void normalize();
};