[Kde-games-devel] Krazy Issues
Matthew Woehlke
mw_triad at users.sourceforge.net
Mon Dec 8 18:47:29 CET 2008
Dmitry Suzdalev wrote:
> On Sunday 07 December 2008 14:42:03 Frederik Schwarzer wrote:
>> While looking at some of the issues in libkdegames (for learning
>> reasons), I created the attached patch. Does somebody want to
>> have a look at it?
>
> Looks nice to me, except that this change:
>
> - foreach(KGameDifficulty::standardLevel level, m_standardLevels) {
> + foreach(const KGameDifficulty::standardLevel &level, m_standardLevels) {
>
> It's not really an optimization, because standardLevel is a enum, and passing
> it as a const reference doesn't bring any improvement - it'll be optimized by
> compiler.
>
> Well, no harm either.
IMHO simple data types should *not* be tossed around const& :-). (Did
Krazy really suggest this change? If so I'd say that should be filed as
a bug against Krazy...)
I'm assuming of course that Dmitry is right about it being an enum, as I
didn't actually check.
Also, in kgame/dialogs/kgamedialogconfig.cpp, why only replace QLineEdit
with KLineEdit? Maybe it would be better to do as the TODO suggests and
use KIntNumInput instead?
--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
"Do you do windows as well?"
"Only when I'm forced to deal with Microsoft..."
-- from a story by Feech
More information about the kde-games-devel
mailing list