diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-08-31 16:52:54 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-08-31 16:52:54 +0200 |
| commit | 2b29e921db8800b015fe9f9d664e506c3e02b0e5 (patch) | |
| tree | 915771556f575f4881277e32e2a33a7d38a8c29d /test/icon.cxx | |
| parent | c91713fd889f4744924f41f8c13b87cec99ef645 (diff) | |
Fix MSVC compiler warnings in test/icon.cxx (#109)
Also:
- remove unnecessary 'size_t' conversions from FL/fl_casts.H
- add reverse conversions from integer types to 'void *'
Diffstat (limited to 'test/icon.cxx')
| -rw-r--r-- | test/icon.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/icon.cxx b/test/icon.cxx index c36e9a066..3bf565ff9 100644 --- a/test/icon.cxx +++ b/test/icon.cxx @@ -1,7 +1,7 @@ // // Icon test program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2021 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 @@ -22,7 +22,7 @@ static Fl_Double_Window *win; void choice_cb(Fl_Widget *, void *v) { - Fl_Color c = (Fl_Color)(fl_intptr_t)v; + Fl_Color c = (Fl_Color)fl_uint(v); uchar buffer[32*32*3]; Fl_RGB_Image icon(buffer, 32, 32, 3); icon.color_average(c, 0.0); @@ -30,9 +30,9 @@ void choice_cb(Fl_Widget *, void *v) { } Fl_Menu_Item choices[] = { - {"Red",0,choice_cb,(void*)FL_RED}, - {"Green",0,choice_cb,(void*)FL_GREEN}, - {"Blue",0,choice_cb,(void*)FL_BLUE}, + {"Red", 0, choice_cb, fl_voidptr(FL_RED)}, + {"Green", 0, choice_cb, fl_voidptr(FL_GREEN)}, + {"Blue", 0, choice_cb, fl_voidptr(FL_BLUE)}, {0} }; |
