paragui-users
[Top][All Lists]
Advanced

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

Re: [paragui-users] patch


From: Atani
Subject: Re: [paragui-users] patch
Date: Sat, 28 Jun 2003 07:40:31 -0700
User-agent: KMail/1.5.2

On Saturday 28 June 2003 03:49 am, H. C. wrote:
> - added GetIcon(Uint8 num) to PG_Button (num has to be either 0, 1 or 2 -
> it represents the different images for iconup, icondown and iconover) -
> added GetIcon() to PG_Label

I see one small potential flaw in the patch....  It opens up (via pointers) 
the ability for the internal data structure for the icons to be fully and 
directly modified.  This should instead return either a copy or a constant 
version.

Additionally, it would be better to use an enum (or constants) defined on 
PG_Button for the 0,1,2 index values.  This will make the code easier to read 
and understand what it is doing not to mention make the checks a bit cleaner 
in the PG_Button code (ie: have a min and max constant value and do bounds 
checking)

Mike





reply via email to

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