glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[glob2-devel] Ugly code in glob2 hg


From: Stéphane Magnenat
Subject: [glob2-devel] Ugly code in glob2 hg
Date: Wed, 4 Jul 2007 14:11:28 +0200
User-agent: KMail/1.9.7

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]