Fix compiler warning if user code is compiled with '-Wextra' (2)
Replace '(void*)' cast with '(fl_intptr_t)' because older gcc (4.8.2) issues a warning with '(void*)'.
This commit is contained in:
parent
232a5399d7
commit
c9ea7380d2
@ -684,7 +684,9 @@ public:
|
||||
Each widget has a single callback.
|
||||
\param[in] cb new callback
|
||||
*/
|
||||
void callback(Fl_Callback0* cb) {callback_ = (Fl_Callback*)(void*)cb;}
|
||||
void callback(Fl_Callback0* cb) {
|
||||
callback_ = (Fl_Callback*)(fl_intptr_t)(cb);
|
||||
}
|
||||
|
||||
/** Sets the current callback function for the widget.
|
||||
Each widget has a single callback.
|
||||
@ -692,7 +694,7 @@ public:
|
||||
\param[in] p user data
|
||||
*/
|
||||
void callback(Fl_Callback1* cb, long p = 0) {
|
||||
callback_ = (Fl_Callback*)(void *)cb;
|
||||
callback_ = (Fl_Callback*)(fl_intptr_t)(cb);
|
||||
user_data_ = (void*)(fl_intptr_t)p;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user