diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-08-24 12:57:39 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-10-06 11:21:23 +0200 |
commit | dc3c48c66aca34da34ca1e88f5e90abc27f3d03f (patch) | |
tree | b112eefe94eac7f369e339ae511a259d32eb1c8f /platform | |
parent | 1d0fc022c743658e619e1d180ccb050e0eb3751b (diff) | |
download | mupdf-dc3c48c66aca34da34ca1e88f5e90abc27f3d03f.tar.xz |
gl: Fix MSVC warnings.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/gl/gl-main.c | 22 | ||||
-rw-r--r-- | platform/win32/libglfw.vcproj | 4 | ||||
-rw-r--r-- | platform/win32/mupdf-gl.vcproj | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index d0e77d4e..5634e364 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -200,7 +200,7 @@ static fz_rect search_hit_bbox[500]; static void update_title(void) { static char buf[256]; - int n = strlen(title); + size_t n = strlen(title); if (n > 50) sprintf(buf, "...%s - %d / %d", title + n - 50, currentpage + 1, fz_count_pages(ctx, doc)); else @@ -495,7 +495,7 @@ static void ui_input_draw(int x0, int y0, int x1, int y1, struct input *input) qx = px + measure_string_part(p, q); ex = qx + measure_string_part(q, input->end); - glColor4f(0.6, 0.6, 1.0, 1); + glColor4f(0.6f, 0.6f, 1.0f, 1.0f); glRectf(px, y0 + 2, qx+1, y1 - 2); glColor4f(0, 0, 0, 1); @@ -667,7 +667,7 @@ static void ui_scrollbar(int x0, int y0, int x1, int y1, int *value, int page, i if (max <= 0) { - glColor4f(0.6, 0.6, 0.6, 1); + glColor4f(0.6f, 0.6f, 0.6f, 1.0f); glRectf(x0, y0, x1, y1); return; } @@ -710,9 +710,9 @@ static void ui_scrollbar(int x0, int y0, int x1, int y1, int *value, int page, i top = (float) *value * avail_h / max; - glColor4f(0.6, 0.6, 0.6, 1); + glColor4f(0.6f, 0.6f, 0.6f, 1.0f); glRectf(x0, y0, x1, y1); - glColor4f(0.8, 0.8, 0.8, 1); + glColor4f(0.8f, 0.8f, 0.8f, 1.0f); glRectf(x0, top, x1, top + thumb_h); } @@ -759,7 +759,7 @@ static int draw_outline_imp(fz_outline *node, int end, int x0, int x1, int x, in } if (currentpage == p || (currentpage > p && currentpage < n)) { - glColor4f(0.9, 0.9, 0.9, 1); + glColor4f(0.9f, 0.9f, 0.9f, 1.0f); glRectf(x0, y + h, x1, y + h + lineheight); } } @@ -848,11 +848,11 @@ static void draw_links(fz_link *link, int xofs, int yofs, float zoom, float rota if (ui.hot == link || showlinks) { if (ui.active == link && ui.hot == link) - glColor4f(0, 0, 1, 0.4); + glColor4f(0, 0, 1, 0.4f); else if (ui.hot == link) - glColor4f(0, 0, 1, 0.2); + glColor4f(0, 0, 1, 0.2f); else - glColor4f(0, 0, 1, 0.1); + glColor4f(0, 0, 1, 0.1f); glRectf(xofs + r.x0, yofs + r.y0, xofs + r.x1, yofs + r.y1); } @@ -931,7 +931,7 @@ static void draw_search_hits(int xofs, int yofs, float zoom, float rotate) fz_transform_rect(&r, &ctm); - glColor4f(1, 0, 0, 0.4); + glColor4f(1, 0, 0, 0.4f); glRectf(xofs + r.x0, yofs + r.y0, xofs + r.x1, yofs + r.y1); } @@ -1058,7 +1058,7 @@ static void on_display(GLFWwindow *window) static int save_ui_y = 0; glViewport(0, 0, screen_w, screen_h); - glClearColor(0.3, 0.3, 0.3, 1.0); + glClearColor(0.3f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_PROJECTION); diff --git a/platform/win32/libglfw.vcproj b/platform/win32/libglfw.vcproj index f209c823..d5d810a8 100644 --- a/platform/win32/libglfw.vcproj +++ b/platform/win32/libglfw.vcproj @@ -43,7 +43,7 @@ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_GLFW_WIN32;_GLFW_WGL;_GLFW_USE_OPENGL" MinimalRebuild="true" BasicRuntimeChecks="3" - RuntimeLibrary="3" + RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -103,7 +103,7 @@ <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_GLFW_WIN32;_GLFW_WGL;_GLFW_USE_OPENGL" - RuntimeLibrary="2" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" diff --git a/platform/win32/mupdf-gl.vcproj b/platform/win32/mupdf-gl.vcproj index b1adc8c2..662b559b 100644 --- a/platform/win32/mupdf-gl.vcproj +++ b/platform/win32/mupdf-gl.vcproj @@ -44,7 +44,7 @@ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" BasicRuntimeChecks="3" - RuntimeLibrary="3" + RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -119,7 +119,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\include;..\..\thirdparty\glfw\include;..\..\scripts\freetype;..\..\thirdparty\freetype\include" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" - RuntimeLibrary="2" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" |