r4171 - software/ui/src
Enrico Zini
enrico at alioth.debian.org
Mon Sep 10 20:57:05 UTC 2007
Author: enrico
Date: 2007-09-10 20:57:05 +0000 (Mon, 10 Sep 2007)
New Revision: 4171
Modified:
software/ui/src/goplay.cpp
Log:
Worked around fltk's non-constness requirements. Closes: #441120
Modified: software/ui/src/goplay.cpp
===================================================================
--- software/ui/src/goplay.cpp 2007-09-10 20:46:55 UTC (rev 4170)
+++ software/ui/src/goplay.cpp 2007-09-10 20:57:05 UTC (rev 4171)
@@ -143,10 +143,16 @@
return "";
}
-static char *VoidString = "";
+//static const char *VoidString = "";
static void UpdateUILists(GamesUI& ui)
{
+ // Defining this here, non-const, because fltk's interface want non-const
+ // strings and I did not have time to check whether it would attempt to
+ // modify the parameter or not. Likely not, and thus a
+ // const_cast<char*>(VoidString) would probably have been better.
+ // --Enrico
+ char VoidString[1] = "";
Engine& engine = *ui.engine;
const char* oldType = ReadFlChoice(*ui.TypeSelection);
const char* oldIface = ReadFlChoice(*ui.InterfaceSelection);
More information about the Pkg-games-commits
mailing list