Closed Bug 216588 Opened 21 years ago Closed 16 years ago

Remove GOTOs from nsMsgUtils.cpp

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mbockelkamp, Unassigned)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030812 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030812 Remove GOTOs from nsMsgUtils.cpp Reproducible: Always Steps to Reproduce: 1. 2. 3.
Blocks: 213004
Attached patch Patch v1Splinter Review
Attachment #130017 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #130017 - Flags: review?(neil.parkwaycc.co.uk)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 130017 [details] [diff] [review] Patch v1 You can't request a SR from neil. Please look at the SR list first
Attachment #130017 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview?(scott)
No. Don't do this. You've just increased codesize and reduced readability, and for what? the goto's were perfectly happy the way they were. If you really want to kill them, then do something like this instead. while(1) // or, |for (;;)| { .... continue; // used to be |goto AGAIN;| .... continue; // used to be |goto AGAIN;| .... break; } but, why on earth bother?
The problem I have with GOTOs is that you have to look for the calls, instead of just looking for the matching } in a "normal" loop. I knew this would increasee the code size, but I think it's only a few bytes. If you wish to keep the GOTOs, then one could perhaps do this: AGAIN: //called from Lines x and y This would be bad if the file is modified, because updating the line numbers will be forgotten. So perhaps this way: AGAIN: //called from two places ... //no more calls to AGAIN from here on This would also speed up reading the code.
Attachment #130017 - Flags: superreview?(mscott)
Attachment #130017 - Flags: review?(neil.parkwaycc.co.uk)
Product: MailNews → Core
sorry for the spam. making bugzilla reflect reality as I'm not working on these bugs. filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: esther → composition
Let's resolve this old monster. WONTFIX.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: