Confirmed users
381
edits
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
#Collapse the XPCom interface nsIClass class and the child nsClass that implements it | #Collapse the XPCom interface nsIClass class and the child nsClass that implements it | ||
##To avoid header pollution, find out what member variables are declared in nsClass that do not have headers for in the nsIClass and can not use a forward declaration. | ##To avoid header pollution, find out what member variables are declared in nsClass that do not have headers for in the nsIClass and can not use a forward declaration. | ||
##Rewrite them to form foo var to nsAutoPtr<foo> var. And add initializers for them to the constructor | ##'''Adds overhead:''' Rewrite them to form foo var to nsAutoPtr<foo> var. And add initializers for them to the constructor | ||
##Update code that uses var. Eg var.member becomes var->member, var passed in an argument by value/const reference becomes *var. | ##'''Adds overhead:''' Update code that uses var. Eg var.member becomes var->member, var passed in an argument by value/const reference becomes *var. | ||
##Place nsClass members into nsIClass removing virtual unless there are derivatives of nsClass | ##Place nsClass members into nsIClass removing virtual unless there are derivatives of nsClass | ||
##* replace macros like NS_IMETHOD with nsresult | ##* replace macros like NS_IMETHOD with nsresult | ||