Fixes some VC compiler warnings

This commit is contained in:
Matthias Melcher 2022-12-10 16:03:29 +01:00
parent 8dea6505e9
commit 60d6e9be14
2 changed files with 17 additions and 15 deletions

View File

@ -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 }
};

View File

@ -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);
}