On 7/4/07, Stéphane Magnenat <[EMAIL PROTECTED]> wrote:

Hi,

I've had a quick look at src/GameGUI.cpp to look for the scroll bug, at
I've
discovered with horror that there is a lot of key related code that is not
styled according to glob2's coding rules. This code is very hard to read
and
thus very likely to hide bugs. I've fixed it, but please take care of
doing
good looking code.

Furthermore, this key code is full of "if" and "case", which shows a bad
coding practice. This should be improved with tables and indexes.

Also, indexing actions with strings is bad for readability and efficiency.

Oh and did I mentioned it is fully uncommented?

In summary, I don't have time to find the bug now in such a mess.

Steph

--
http://stephane.magnenat.net


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel


Then try rewriting the mess like I have been. Anyhow indexing by strings I
chose specifically because it was good for readability, in fact this was
discussed a long time ago (when I did customizable keyboard shortcuts), we
concluded that for anyone half intelligent an enum was just as readable,
however the change was never done.

--
Really. I'm not lieing. Bradley Arsenault.
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to