diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-03-09 17:47:11 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-03-09 17:47:51 +0100 |
| commit | 8b1ec4c531c9687e0d6285454747a0b66310c682 (patch) | |
| tree | 356b601df807a4e3b96cee9dcfff52a5aedf8cab /examples | |
| parent | 25276320543170480711ee5e9c2e03d4fd7cc2d1 (diff) | |
Fix Visual Studio (MSVC) compiler warnings
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/animgifimage-play.cxx | 4 | ||||
| -rw-r--r-- | examples/animgifimage-resize.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/animgifimage-play.cxx b/examples/animgifimage-play.cxx index 4a319f842..c5f831901 100644 --- a/examples/animgifimage-play.cxx +++ b/examples/animgifimage-play.cxx @@ -120,9 +120,9 @@ static void zoom(bool out) { // Note: deliberately no range check (use key 'N' to reset) static const double f = 1.05; if (out) - animgif.resize((double)W/f, (double)H/f); + animgif.resize(int(W/f), int(H/f)); else - animgif.resize(f*W, f*H); + animgif.resize(int(f*W), int(f*H)); } static void change_speed(int dir_) { diff --git a/examples/animgifimage-resize.cxx b/examples/animgifimage-resize.cxx index 1417255b3..a357e186c 100644 --- a/examples/animgifimage-resize.cxx +++ b/examples/animgifimage-resize.cxx @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) { // set initial size to fit into window double ratio = orig->valid() ? (double)orig->w() / orig->h() : 1; int W = win.w() - 40; - int H = (double)W / ratio; + int H = int(W / ratio); printf("original size: %d x %d\n", orig->w(), orig->h()); win.size(W, H); Fl::add_handler(events); |
