diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-05-06 13:38:04 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-05-06 13:38:04 +0200 |
| commit | 4190cd5426efb4f9c30109bd914a1de12ed241fb (patch) | |
| tree | 42789f593e7fdb37fd2da85af88ec6b9f2bb7cf3 | |
| parent | 0bd1c2e239ed39bebbe0c1af7e5c7495ba97c880 (diff) | |
Fix Windows (Visual Studio) compiler warnings
| -rw-r--r-- | src/Fl_Shared_Image.cxx | 2 | ||||
| -rw-r--r-- | src/gl_draw.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index 979fe32b0..8b3a34ded 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -257,7 +257,7 @@ void Fl_Shared_Image::reload() { if (!name_) return; if ((fp = fl_fopen(name_, "rb")) != NULL) { - count = fread(header, 1, sizeof(header), fp); + count = (int)fread(header, 1, sizeof(header), fp); fclose(fp); if (count == 0) return; diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index 6bda5670d..c64506d86 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -408,13 +408,13 @@ int gl_texture_fifo::compute_texture(const char* str, int n) Fl_Fontsize fs = fl_size(); float s = fl_graphics_driver->scale(); fl_graphics_driver->Fl_Graphics_Driver::scale(1); // temporarily remove scaling factor - fl_font(fl_font(), fs * Fl_Gl_Window_Driver::gl_scale); // the font size to use in the GL scene + fl_font(fl_font(), int(fs * Fl_Gl_Window_Driver::gl_scale)); // the font size to use in the GL scene int w = (int)ceil( fl_width(fifo[current].utf8, n) ); w = ((w + 3) / 4) * 4; // make w a multiple of 4 int h = fl_height(); fl_graphics_driver->Fl_Graphics_Driver::scale(s); // re-install scaling factor fl_font(fl_font(), fs); - fs *= Fl_Gl_Window_Driver::gl_scale; + fs = int(fs * Fl_Gl_Window_Driver::gl_scale); fifo[current].scale = Fl_Gl_Window_Driver::gl_scale; fifo[current].fdesc = gl_fontsize; char *alpha_buf = Fl_Gl_Window_Driver::global()->alpha_mask_for_string(str, n, w, h, fs); |
