mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
Fix Windows (Visual Studio) compiler warnings
This commit is contained in:
@@ -257,7 +257,7 @@ void Fl_Shared_Image::reload() {
|
|||||||
if (!name_) return;
|
if (!name_) return;
|
||||||
|
|
||||||
if ((fp = fl_fopen(name_, "rb")) != NULL) {
|
if ((fp = fl_fopen(name_, "rb")) != NULL) {
|
||||||
count = fread(header, 1, sizeof(header), fp);
|
count = (int)fread(header, 1, sizeof(header), fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return;
|
return;
|
||||||
|
|||||||
+2
-2
@@ -408,13 +408,13 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
|
|||||||
Fl_Fontsize fs = fl_size();
|
Fl_Fontsize fs = fl_size();
|
||||||
float s = fl_graphics_driver->scale();
|
float s = fl_graphics_driver->scale();
|
||||||
fl_graphics_driver->Fl_Graphics_Driver::scale(1); // temporarily remove scaling factor
|
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) );
|
int w = (int)ceil( fl_width(fifo[current].utf8, n) );
|
||||||
w = ((w + 3) / 4) * 4; // make w a multiple of 4
|
w = ((w + 3) / 4) * 4; // make w a multiple of 4
|
||||||
int h = fl_height();
|
int h = fl_height();
|
||||||
fl_graphics_driver->Fl_Graphics_Driver::scale(s); // re-install scaling factor
|
fl_graphics_driver->Fl_Graphics_Driver::scale(s); // re-install scaling factor
|
||||||
fl_font(fl_font(), fs);
|
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].scale = Fl_Gl_Window_Driver::gl_scale;
|
||||||
fifo[current].fdesc = gl_fontsize;
|
fifo[current].fdesc = gl_fontsize;
|
||||||
char *alpha_buf = Fl_Gl_Window_Driver::global()->alpha_mask_for_string(str, n, w, h, fs);
|
char *alpha_buf = Fl_Gl_Window_Driver::global()->alpha_mask_for_string(str, n, w, h, fs);
|
||||||
|
|||||||
Reference in New Issue
Block a user