diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-04-04 23:40:29 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-04-04 23:40:29 +0200 |
| commit | 9d9646fb124aee9255a6bc11a7af65bc54e94fb6 (patch) | |
| tree | 3f0bda25e9bf25035dbf43fd8d1238f51d96a552 | |
| parent | 3ac16f1dc4d0165724eb2a10742e09866041c9f2 (diff) | |
Fix compiler warning, part 2 of #946
| -rw-r--r-- | FL/Fl_Menu_Item.H | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 94035d097..a4f760645 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -1,7 +1,7 @@ // // Menu item header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2022 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 @@ -318,7 +318,9 @@ struct FL_EXPORT Fl_Menu_Item { This method does not set the userdata() argument. \see Fl_Callback_p Fl_MenuItem::callback() const */ - void callback(Fl_Callback0*c) {callback_=(Fl_Callback*)c;} + void callback(Fl_Callback0 *c) { + callback_ = (Fl_Callback *)(void *)c; + } /** Sets the menu item's callback function and userdata() argument. @@ -326,7 +328,10 @@ struct FL_EXPORT Fl_Menu_Item { for the menu item's callback function. \see Fl_Callback_p Fl_MenuItem::callback() const */ - void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)(fl_intptr_t)p;} + void callback(Fl_Callback1 *c, long p = 0) { + callback_ = (Fl_Callback *)(void *)c; + user_data_ = (void *)(fl_intptr_t)p; + } /** Gets the user_data() argument that is sent to the callback function. |
