[Kde-games-devel] Legacy code problem in libkdegames/kgame
Ian Wadham
iandw.au at gmail.com
Sat Dec 31 23:50:37 UTC 2011
On 31/12/2011, at 11:37 PM, Albert Astals Cid wrote:
> Ok, now answering with the correct answer :D
>
> gcc seems to be smart enough not to try to compile the template code if noone
> uses it, and since there is no code in KDE using KGamePropertyArray::sort(),
> it does not fail to compile, if you add this patch
>
> Index: /home/kdeunstable/kdegames/kfourinline/src/kwin4doc.cpp
> ===================================================================
> --- /home/kdeunstable/kdegames/kfourinline/src/kwin4doc.cpp (revision
> 1266286)
> +++ /home/kdeunstable/kdegames/kfourinline/src/kwin4doc.cpp (working copy)
> @@ -75,6 +75,7 @@
>
> // Game initialization
> mField.resize(42);
> + mField.sort();
>
> // ****************************************
> // NOTE: Do not i18n the strings here. They
>
> It will fail to compile in gcc too, thus this means that the sort() function
> is useless because it can not be effectively used at all.
>
> I will remove KGamePropertyArray::sort() after sending this email.
That must be the answer, Albert. I will report this to the Macports list
so that they can patch the kdegames4 @4.7.4 port, force compilation
with GCC or whatever.
Thanks very much, Albert.
Cheers, Ian W.
More information about the kde-games-devel
mailing list