Thunderbird:CodeCleanup: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 1: Line 1:
In preparation for Thunderbird using libxul, we need to remove our use of nsXPIDLStrings. While we are doing this, we're taking the opportunity to modernize some of our core interfaces to use AString and ACString instead of wstring and string.
In preparation for Thunderbird and Seamonkey moving to frozen linkages/libxul/XULRunner, we need to remove our use of nsXPIDLStrings from mailnews (along with other changes). While we are doing this, we're taking the opportunity to modernize some of our core interfaces to use AString and ACString instead of wstring and string.


These changes have caused us to notice a lot of bad or less efficient patterns in mailnews. By documenting these patterns and the associated fixes, it will hopefully be easier for more folks to help out in the great mailnews code cleanup of 2007!
In starting to make these changes, we've noticed inefficient code patterns in our C++ code in mailnews. A lot of of these patterns can be improved as part of the AString API changes. By documenting these patterns and the associated fixes, it will hopefully be easier for more folks to help out in the great mailnews code cleanup of 2007!


== Strings ==
== Strings ==
First, familiarize yourself with: http://developer.mozilla.org/en/docs/XPCOM:Strings#Common_Patterns
First, familiarize yourself with: http://developer.mozilla.org/en/docs/XPCOM:Strings#Common_Patterns
We aren't trying to replace that document, just highlighting some of the patterns we see a lot of / improvements we can make.


  nsCString value;
  nsCString value;
272

edits

Navigation menu