Browse Source

Remove unnecessary casts from glut demo programs

These casts are no longer useful since commit 5cd9f6fb8058f92d:
"STR #3323: glutAddMenuEntry now has a const label argument"
pull/1104/head
Albrecht Schlosser 7 months ago
parent
commit
975cd3b4fd
  1. 3
      CHANGES.txt
  2. 26
      test/fractals.cxx
  3. 10
      test/glpuzzle.cxx

3
CHANGES.txt

@ -1,4 +1,4 @@
Changes in FLTK 1.4.0 Released: Feb ?? 2024 Changes in FLTK 1.4.0 Released: Oct ?? 2024
General Information about this Release General Information about this Release
@ -243,6 +243,7 @@ Changes in FLTK 1.4.0 Released: Feb ?? 2024
- Some methods of Fl_Tabs are now virtual and/or protected for easier - Some methods of Fl_Tabs are now virtual and/or protected for easier
subclassing without code duplication (STR #3211 and others). subclassing without code duplication (STR #3211 and others).
To be continued... To be continued...
- glutAddMenuEntry() now has a *const* label argument (STR #3323)
- Separated Fl_Input_Choice.H and Fl_Input_Choice.cxx (STR #2750, #2752). - Separated Fl_Input_Choice.H and Fl_Input_Choice.cxx (STR #2750, #2752).
- Separated Fl_Spinner.H and Fl_Spinner.cxx (STR #2776). - Separated Fl_Spinner.H and Fl_Spinner.cxx (STR #2776).
- New method Fl_Spinner::wrap(int) allows to set wrap mode at bounds if - New method Fl_Spinner::wrap(int) allows to set wrap mode at bounds if

26
test/fractals.cxx

@ -724,28 +724,28 @@ void MenuInit(void)
int submenu3, submenu2, submenu1; int submenu3, submenu2, submenu1;
submenu1 = glutCreateMenu(setlevel); submenu1 = glutCreateMenu(setlevel);
glutAddMenuEntry((char *)"0", 0); glutAddMenuEntry((char *)"1", 1); glutAddMenuEntry("0", 0); glutAddMenuEntry("1", 1);
glutAddMenuEntry((char *)"2", 2); glutAddMenuEntry((char *)"3", 3); glutAddMenuEntry("2", 2); glutAddMenuEntry("3", 3);
glutAddMenuEntry((char *)"4", 4); glutAddMenuEntry((char *)"5", 5); glutAddMenuEntry("4", 4); glutAddMenuEntry("5", 5);
glutAddMenuEntry((char *)"6", 6); glutAddMenuEntry((char *)"7", 7); glutAddMenuEntry("6", 6); glutAddMenuEntry("7", 7);
glutAddMenuEntry((char *)"8", 8); glutAddMenuEntry("8", 8);
submenu2 = glutCreateMenu(choosefract); submenu2 = glutCreateMenu(choosefract);
glutAddMenuEntry((char *)"Moutain", MOUNTAIN); glutAddMenuEntry("Moutain", MOUNTAIN);
glutAddMenuEntry((char *)"Tree", TREE); glutAddMenuEntry("Tree", TREE);
glutAddMenuEntry((char *)"Island", ISLAND); glutAddMenuEntry("Island", ISLAND);
submenu3 = glutCreateMenu(agvSwitchMoveMode); submenu3 = glutCreateMenu(agvSwitchMoveMode);
glutAddMenuEntry((char *)"Flying", FLYING); glutAddMenuEntry("Flying", FLYING);
glutAddMenuEntry((char *)"Polar", POLAR); glutAddMenuEntry("Polar", POLAR);
glutCreateMenu(handlemenu); glutCreateMenu(handlemenu);
glutAddSubMenu((char *)"Level", submenu1); glutAddSubMenu((char *)"Level", submenu1);
glutAddSubMenu((char *)"Fractal", submenu2); glutAddSubMenu((char *)"Fractal", submenu2);
glutAddSubMenu((char *)"Movement", submenu3); glutAddSubMenu((char *)"Movement", submenu3);
glutAddMenuEntry((char *)"New Fractal", MENU_RAND); glutAddMenuEntry("New Fractal", MENU_RAND);
glutAddMenuEntry((char *)"Toggle Axes", MENU_AXES); glutAddMenuEntry("Toggle Axes", MENU_AXES);
glutAddMenuEntry((char *)"Quit", MENU_QUIT); glutAddMenuEntry("Quit", MENU_QUIT);
glutAttachMenu(GLUT_RIGHT_BUTTON); glutAttachMenu(GLUT_RIGHT_BUTTON);
} }

10
test/glpuzzle.cxx

@ -4,7 +4,7 @@
// This is a GLUT demo program to demonstrate fltk's GLUT emulation. // This is a GLUT demo program to demonstrate fltk's GLUT emulation.
// Search for "fltk" to find all the changes // Search for "fltk" to find all the changes
// //
// Copyright 1998-2020 by Bill Spitzak and others. // Copyright 1998-2024 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@ -1485,10 +1485,10 @@ main(int argc, char **argv)
glutMouseFunc(mouse); glutMouseFunc(mouse);
glutVisibilityFunc(visibility); glutVisibilityFunc(visibility);
glutCreateMenu(menu); glutCreateMenu(menu);
glutAddMenuEntry((char *)"Normal pos", 1); glutAddMenuEntry("Normal pos", 1);
glutAddMenuEntry((char *)"Solve", 2); glutAddMenuEntry("Solve", 2);
glutAddMenuEntry((char *)"Reset", 3); glutAddMenuEntry("Reset", 3);
glutAddMenuEntry((char *)"Quit", 4); glutAddMenuEntry("Quit", 4);
glutAttachMenu(GLUT_RIGHT_BUTTON); glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMainLoop(); glutMainLoop();
return 0; /* ANSI C requires main to return int. */ return 0; /* ANSI C requires main to return int. */

Loading…
Cancel
Save