Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Commenting source code (Re: Problems with Controls Manager)



On 27/08/2003 01:39, Byron Han <email@hidden> wrote:

> On Aug 26, 2003, at 10:49 AM, Laurence Harris wrote:
>
>> err = GetControlEventControlRefParam( inEvent, outControl );
>>
>> where GetControlEventControlRefParam() is defined as:
>>
>> inline OSStatus GetControlEventControlRefParam( const EventRef inEvent,
>> ControlRef &outControl )
>> {
>> return GetEventParameter( inEvent, kEventParamDirectObject,
>> typeControlRef, NULL, sizeof( ControlRef ), NULL, &outControl );
>> }
>>
>> Less to type and much easier to read.
>
> better yet use a macro. reduces code bloat and function call overhead.

But at the same time it adds more code bloat (more params to pass) and
adds more fun during debugging (what you see is not what is called).

Mike
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.