Closed Bug 320334 Opened 15 years ago Closed 15 years ago

Make never-overridden methods of nsIMAPGenericParser non-virtual and concatenate error flags.

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: engel, Assigned: engel)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

The following methods in |nsIMAPGenericParser| are never overridden, make them non-virtual.
   SetConnected
   ContinueParse
   skip_to_CRLF
   skip_to_close_paren
   CreateString
   CreateAstring
   CreateNilString
   CreateLiteral
   CreateAtom
   CreateQuoted
   CreateParenGroup

Also, merge the status flags |nsIMAPGenericParser::fDisconnected| and |nsIMAPGenericParser::fSyntaxError|; this simplifies the often-invoked method |nsIMAPGenericParser::ContinueParse()|.

Finally, do no longer include "nsIMAPGenericParser.h" in nsIMAPNamespace.cpp and nsImapUrl.cpp.
Attachment #205921 - Flags: review?(bienvenu)
Status: NEW → ASSIGNED
Comment on attachment 205921 [details] [diff] [review]
Make never-overridden methods non-virtual etc.

thx for the patch.

Instead of this:

  if (connected)
+      fParserState = fParserState & ~stateDisconnectedFlag;
+  else
+      fParserState = fParserState | stateDisconnectedFlag;
 }
 
can you do something like
fParserState |= stateDisconnectedFlag; 

and 

fParserState &= ~stateDisconnectedFlag;
Simplified code as suggested in Comment 2, thank you David.
Attachment #205921 - Attachment is obsolete: true
Attachment #206019 - Flags: review?
Attachment #205921 - Flags: review?(bienvenu)
Attachment #206019 - Flags: review? → review?(bienvenu)
David landed this 2005-12-19 09:27 PDT.  David: can you mark review+ and FIXED?  Thanks
Comment on attachment 206019 [details] [diff] [review]
Make never-overridden methods non-virtual etc. (v2)

thx, Hans-Andreas
Attachment #206019 - Flags: review?(bienvenu) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Verified FIXED via LXR (and heavy IMAP usage/testing since its landing)

1.15	bienvenu%nventure.com	2005-12-19 09:27	 	fix 320334 make non-overridden methods non-virtual, patch by engel@physics.harvard.edu, r/sr=bienvenu
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.