Fixes a few minor compiler warnings.

This commit is contained in:
Matthias Melcher 2023-12-01 15:25:07 +01:00
parent 1077d74958
commit ccc21d381a
4 changed files with 7 additions and 4 deletions

View File

@ -176,6 +176,7 @@ protected:
public:
int ex, ey, dx, dy, type, mask;
Fd_Snap_Action() : ex(0x7fff), ey(0x7fff), dx(128), dy(128), type(0), mask(0) { }
virtual ~Fd_Snap_Action() { }
virtual void check(Fd_Snap_Data &d) = 0;
virtual void draw(Fd_Snap_Data &d) { }
virtual bool matches(Fd_Snap_Data &d);

View File

@ -255,7 +255,7 @@ void Fl_Widget_Type::redraw() {
Fl_Type *sort(Fl_Type *parent) {
Fl_Type *f,*n=0;
for (f = parent ? parent->next : Fl_Type::first; ; f = n) {
if (!f || (parent && f->level <= parent->level)) return f;
if (!f || (parent && f->level <= parent->level)) break;
n = sort(f);
if (!f->selected || !f->is_true_widget()) continue;
Fl_Widget* fw = ((Fl_Widget_Type*)f)->o;
@ -268,7 +268,9 @@ Fl_Type *sort(Fl_Type *parent) {
}
if (g != f) f->move_before(g);
}
parent->layout_widget();
if (parent)
parent->layout_widget();
return f;
}
////////////////////////////////////////////////////////////////

View File

@ -322,7 +322,7 @@ uchar *Fl_Window_Type::read_image(int &ww, int &hh) {
}
void Fl_Window_Type::ideal_size(int &w, int &h) {
w = 480, h = 320;
w = 480; h = 320;
if (main_window) {
int sx, sy, sw, sh;
Fl_Window *win = main_window;

View File

@ -208,7 +208,7 @@ void align_widget_cb(Fl_Widget*, long how)
break;
//---- space evenly
case 20: // space evenly across
left = max; right = min; wdt = 0, n = 0;
left = max; right = min; wdt = 0; n = 0;
for (o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_widget())
{