From eb545c981bc8835df1b0bfcef7f5d8ee50433acb Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 24 Oct 2024 17:56:51 +0200 Subject: [PATCH] Fluid: replace 'FL_WINDOW+1' with 'FL_DOUBLE_WINDOW' Note: 'FL_DOUBLE_WINDOW' *is* currently defined as 'FL_WINDOW+1'. This commit doesn't change real code but prevents potential bugs in the future if one of these constants would be changed. --- fluid/Fl_Widget_Type.cxx | 4 ++-- fluid/Fl_Window_Type.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index aaa96883f..4048933bc 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1,7 +1,7 @@ // // Widget type code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2024 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 @@ -64,7 +64,7 @@ const char* subclassname(Fl_Type* l) { const char* c = p->subclass(); if (c) return c; if (l->is_class()) return "Fl_Group"; - if (p->o->type() == FL_WINDOW+1) return "Fl_Double_Window"; + if (p->o->type() == FL_DOUBLE_WINDOW) return "Fl_Double_Window"; if (p->id() == ID_Input) { if (p->o->type() == FL_FLOAT_INPUT) return "Fl_Float_Input"; if (p->o->type() == FL_INT_INPUT) return "Fl_Int_Input"; diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 55f66e6cf..e539d671a 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -108,7 +108,7 @@ void show_settings_cb(Fl_Widget *, void *) { Fl_Menu_Item window_type_menu[] = { {"Single",0,0,(void*)FL_WINDOW}, - {"Double",0,0,(void*)(FL_WINDOW+1)}, + {"Double",0,0,(void*)(FL_DOUBLE_WINDOW)}, {0}}; static int overlays_invisible;