summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-12-10 16:03:29 +0100
committerMatthias Melcher <github@matthiasm.com>2022-12-10 16:03:29 +0100
commit60d6e9be1469ae148d30c4a4366aac136580785a (patch)
tree2300aea59bfe005ab3f52964e65fb487e1005f43
parent8dea6505e92a93156820ea24f1256f08cf2b9e8f (diff)
Fixes some VC compiler warnings
-rw-r--r--fluid/Fl_Widget_Type.cxx28
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx4
2 files changed, 17 insertions, 15 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 8899902bf..f673072ee 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1320,20 +1320,20 @@ void labeltype_cb(Fl_Choice* i, void *v) {
////////////////////////////////////////////////////////////////
Fl_Menu_Item colormenu[] = {
- { "Foreground Color", 0, 0, (void*)FL_FOREGROUND_COLOR, 0, 0, FL_HELVETICA, 11},
- { "Background Color", 0, 0, (void*)FL_BACKGROUND_COLOR, 0, 0, FL_HELVETICA, 11},
- { "Background Color 2", 0, 0, (void*)FL_BACKGROUND2_COLOR, 0, 0, FL_HELVETICA, 11},
- { "Selection Color", 0, 0, (void*)FL_SELECTION_COLOR, 0, 0, FL_HELVETICA, 11},
- { "Inactive Color", 0, 0, (void*)FL_INACTIVE_COLOR, FL_MENU_DIVIDER, 0, FL_HELVETICA, 11},
- { "Black", 0, 0, (void*)FL_BLACK, 0, 0, FL_HELVETICA, 11},
- { "White", 0, 0, (void*)FL_WHITE, FL_MENU_DIVIDER, 0, FL_HELVETICA, 11},
- { "Gray 0", 0, 0, (void*)FL_GRAY0, 0, 0, FL_HELVETICA, 11},
- { "Dark 3", 0, 0, (void*)FL_DARK3, 0, 0, FL_HELVETICA, 11},
- { "Dark 2", 0, 0, (void*)FL_DARK2, 0, 0, FL_HELVETICA, 11},
- { "Dark 1", 0, 0, (void*)FL_DARK1, 0, 0, FL_HELVETICA, 11},
- { "Light 1", 0, 0, (void*)FL_LIGHT1, 0, 0, FL_HELVETICA, 11},
- { "Light 2", 0, 0, (void*)FL_LIGHT2, 0, 0, FL_HELVETICA, 11},
- { "Light 3", 0, 0, (void*)FL_LIGHT3, 0, 0, FL_HELVETICA, 11},
+ { "Foreground Color", 0, 0, (void*)(fl_intptr_t)FL_FOREGROUND_COLOR, 0, 0, FL_HELVETICA, 11},
+ { "Background Color", 0, 0, (void*)(fl_intptr_t)FL_BACKGROUND_COLOR, 0, 0, FL_HELVETICA, 11},
+ { "Background Color 2", 0, 0, (void*)(fl_intptr_t)FL_BACKGROUND2_COLOR, 0, 0, FL_HELVETICA, 11},
+ { "Selection Color", 0, 0, (void*)(fl_intptr_t)FL_SELECTION_COLOR, 0, 0, FL_HELVETICA, 11},
+ { "Inactive Color", 0, 0, (void*)(fl_intptr_t)FL_INACTIVE_COLOR, FL_MENU_DIVIDER, 0, FL_HELVETICA, 11},
+ { "Black", 0, 0, (void*)(fl_intptr_t)FL_BLACK, 0, 0, FL_HELVETICA, 11},
+ { "White", 0, 0, (void*)(fl_intptr_t)FL_WHITE, FL_MENU_DIVIDER, 0, FL_HELVETICA, 11},
+ { "Gray 0", 0, 0, (void*)(fl_intptr_t)FL_GRAY0, 0, 0, FL_HELVETICA, 11},
+ { "Dark 3", 0, 0, (void*)(fl_intptr_t)FL_DARK3, 0, 0, FL_HELVETICA, 11},
+ { "Dark 2", 0, 0, (void*)(fl_intptr_t)FL_DARK2, 0, 0, FL_HELVETICA, 11},
+ { "Dark 1", 0, 0, (void*)(fl_intptr_t)FL_DARK1, 0, 0, FL_HELVETICA, 11},
+ { "Light 1", 0, 0, (void*)(fl_intptr_t)FL_LIGHT1, 0, 0, FL_HELVETICA, 11},
+ { "Light 2", 0, 0, (void*)(fl_intptr_t)FL_LIGHT2, 0, 0, FL_HELVETICA, 11},
+ { "Light 3", 0, 0, (void*)(fl_intptr_t)FL_LIGHT3, 0, 0, FL_HELVETICA, 11},
{ 0 }
};
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
index bf29ff8df..461e045bb 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
+++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
@@ -196,6 +196,8 @@ void Fl_OpenGL_Graphics_Driver::end_complex_polygon()
}
// fill the pixels between node pairs
+// Using lines requires additional attention to the current line width and pattern
+// We are using glRectf instead
// glBegin(GL_LINES);
for (i = 0; i < nNodes; i += 2) {
float x0 = nodeX[i];
@@ -207,7 +209,7 @@ void Fl_OpenGL_Graphics_Driver::end_complex_polygon()
x0 = xMin;
if (x1 > xMax)
x1 = xMax;
- glRectf(x0-0.25f, y, x1+0.25f, y+1.0f);
+ glRectf((GLfloat)(x0-0.25f), (GLfloat)(y), (GLfloat)(x1+0.25f), (GLfloat)(y+1.0f));
// glVertex2f((GLfloat)x0, (GLfloat)y);
// glVertex2f((GLfloat)x1, (GLfloat)y);
}