272
edits
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
<span class="highlightred">- PL_strcase(value.get(), "imap://");</span> | <span class="highlightred">- PL_strcase(value.get(), "imap://");</span> | ||
<span class="highlightblue">+ StringBeginsWith(someString, NS_LITERAL_CSTRING("imap://");</span> | <span class="highlightblue">+ StringBeginsWith(someString, NS_LITERAL_CSTRING("imap://");</span> | ||
The following applies to both nsXPIDLString and nsXPIDLCString. This class is going away when we use frozen linkage so we want to replace it with If you are changing an interface such that somemethod now takes a nsAString / nsACString then you don't need the getter_Copies either: | |||
<span class="highlightred">- nsXPIDLString strValue; | |||
- somemethod(getter_Copies(strValue));</span> | |||
<span class="highlightblue">+ nsString strValue; | |||
+ somemethod(getter_Copies(strValue)); or somemethod(strValue);</span> | |||
nsString uniValue; | nsString uniValue; | ||
Line 65: | Line 72: | ||
- nsCOMPtr<nsIMsgIdentity> identity = do_QueryInterface(thisElement, &rv);</span> | - nsCOMPtr<nsIMsgIdentity> identity = do_QueryInterface(thisElement, &rv);</span> | ||
<span class="highlightblue">+ nsCOMPtr<nsIMsgIdentity> identity( do_QueryElementAt(identityArray, i, &rv));</span> | <span class="highlightblue">+ nsCOMPtr<nsIMsgIdentity> identity( do_QueryElementAt(identityArray, i, &rv));</span> | ||
== Other Things To Look For == | |||
* Remove trailing spaces | |||
* Replace any tabs with spaces | |||
* In most files we use a tab width of two spaces. Adjust 4 spaces tab widths. | |||
* Some of the methods in our IDL files start with an upper case letter. When cleaning up an interface, change these to lower case. (Don't forget to search through http://mxr.mozilla.org and fix any JS callers of the API to also be lower case!) | |||
* The more nsCRT/PL_strcmp routines that get replaced with nsString equivalents as part of the string cleanup, the easier it will be to make a later pass through the code to prepare for using frozen linkage where we won't get nsCRT routines anymore. |
edits