Open main menu

CDOT Wiki β

Changes

User:Egmetcalfe/Dead Code

295 bytes removed, 14:34, 9 April 2010
no edit summary
Code Size: 40, ^
====PRBool nsFontSizeTextAttr::GetValueFor(nsIDOMElement*,nscoord*)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValueFor%28&case=1 MXR Search]
 
Code Size: 8
 
====PRBool nsBGColorTextAttr::GetValueFor(nsIDOMElement*,nscolor*)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValueFor%28&case=1 MXR Search]
 
Code Size: 7
 
====PRBool nsFontWeightTextAttr::GetValueFor(nsIDOMElement*,PRInt32*)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValueFor%28&case=1 MXR Search]
 
Code Size: 8
 
Note: A number of calls to GetValueFor functions are made where the second parameter has generic type ie T blah.
 
**** Bah: nothing can be done here - template base classes are no fun
 
Path info: GetValue calls nsCSSTextAttr::Format
 
====PRBool nsTextAttr::GetValue(nsAString_internal&,int)====
 
To verify run [http://mxr.mozilla.org/mozilla-central/search?string=GetValue this search] then grep for all lines that contain at least two commas
 
Code Size: 26
 
Bloody hell, the second param is really PRBool (it's not dead)
 
These are too difficult too verify:
 
====void nsCSSTextAttr::Format(const nsAutoString&,nsAString_internal&)====
 
Code Size: 3
 
====void nsTextAttr::Format(const nsAutoString&,nsAString_internal&)====
 
Code Size: 0
 
====void nsLangTextAttr::Format(const nsAutoString&,nsAString_internal&)====
 
Code Size: 7
 
Argh: the first parameter is a template param in the abstract base class
=== embedding/components/windowwatcher ===
Note: Used in an NS_ASSERTION [http://mxr.mozilla.org/mozilla-central/source/view/public/nsIView.h#155 here]. Why not just call nsIView::IsRoot?
 
===layout/xul===
 
====gfxContext* nsContextBoxBlur::GetContext()====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetContext()&case=1 MXR Search] (Non-virtual function from a non-derived class: the script is probably right)
 
Code Size: 4
 
Note: according to comments in Init, that it "Prepares a gfxContext to draw on. Do not call this twice; if you want to get the gfxContext again use GetContext()", this probably shouldn't be removed.
 
6 of the functions of this class are dead but the [http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsITraceRefcnt.idl#43 idl file] lists the classes status as frozen (and deprecated).
 
== False Positives/Stuff that shouldn't be dealt with ==
 
== accessible ==
 
These are all inherit from a template base class so these individual methods are unuded but removing them requires a major design change
 
====PRBool nsFontSizeTextAttr::GetValueFor(nsIDOMElement*,nscoord*)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValueFor%28&case=1 MXR Search]
 
Code Size: 8
 
====PRBool nsBGColorTextAttr::GetValueFor(nsIDOMElement*,nscolor*)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValueFor%28&case=1 MXR Search]
 
Code Size: 7
 
====PRBool nsFontWeightTextAttr::GetValueFor(nsIDOMElement*,PRInt32*)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValueFor%28&case=1 MXR Search]
 
Code Size: 8
 
Path info: GetValue calls nsCSSTextAttr::Format
 
====PRBool nsTextAttr::GetValue(nsAString_internal&,int)====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetValue this search]
 
Code Size: 26
 
====void nsCSSTextAttr::Format(const nsAutoString&,nsAString_internal&)====
 
Code Size: 3
 
====void nsTextAttr::Format(const nsAutoString&,nsAString_internal&)====
 
Code Size: 0
 
====void nsLangTextAttr::Format(const nsAutoString&,nsAString_internal&)====
 
Code Size: 7
 
===layout/xul===
 
====gfxContext* nsContextBoxBlur::GetContext()====
 
[http://mxr.mozilla.org/mozilla-central/search?string=GetContext()&case=1 MXR Search]
 
Code Size: 4
 
Note: according to comments in Init, that it "Prepares a gfxContext to draw on. Do not call this twice; if you want to get the gfxContext again use GetContext()", this probably shouldn't be removed.
1
edit