Re: [Fire-commits] fire NSAttributedString+AIMLanguage.m,1.41,1.42
Graham Booker <[email protected]> Mon, 8 Dec 2003 08:52:36 -0600
| Newsgroups | gmane.network.fire.devel |
|---|---|
| Message-ID | <[email protected]> |
gcc 3.3 and 295 don't like it when you declare variables after some
lines of code. It wants them in this form:
if(blah){
declarations
code
}
If you look closely at this change, you can see what is really done is
combining the code in the declarations such that the declarations are
all together and not split by any lines of code.
------------------------------------------------------------------
Graham Booker Texas A&M University
[email protected] Graduate Student in ELEN
------------------------------------------------------------------
On Dec 8, 2003, at 8:47 AM, Reid Ellis wrote:
> I was curious about this change:
> On Dec 4, 2003, at 02:28, [email protected] wrote:
>> Update of /cvsroot/fire/fire
>> In directory sc8-pr-cvs1:/tmp/cvs-serv8890
>>
>> Modified Files:
>> NSAttributedString+AIMLanguage.m
>> Log Message:
>> corrected compile error on some platforms (gcc 3.3 or 2.95)
> [...]
>> ***************
>> *** 114,124 ****
>> NSMutableDictionary *datas = [NSMutableDictionary dictionary];
>> NSMutableArray *images = [NSMutableArray array];
>> ! NSFont *defaultFont;
>> ! float defaultPointSize;
>> !
>> ! defaultFont = (isOutbound)?[[NSApp delegate]
>> outgoingMessageFont]:[[NSApp delegate] incomingMessageFont];
>> !
>> ! defaultPointSize = [defaultFont pointSize];
>> ! // First, build up an NSArray of tags and strings to display.
>> NSScanner *scan = [NSScanner scannerWithString: aimml];
>>
>> --- 114,120 ----
>> NSMutableDictionary *datas = [NSMutableDictionary dictionary];
>> NSMutableArray *images = [NSMutableArray array];
>> ! NSFont *defaultFont = (isOutbound)?[[NSApp delegate]
>> outgoingMessageFont]:[[NSApp delegate] incomingMessageFont];
>> ! float defaultPointSize = [defaultFont pointSize];
>> ! // First, build up an NSArray of tags and strings to
>> display.
>> NSScanner *scan = [NSScanner scannerWithString: aimml];
>>
>
>
> How does initializing variables when you declare them correct a
> compiler error? Which platform was this for?
>
> Just curious; I want to avoid compiler errors on various platforms. :-)
>
> Reid
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> fire-development mailing list
> fire-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/fire-development
>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/