Reworked sizeof api's to be much more useful; updated implementations to match
git-svn-id: svn://10.0.0.236/trunk@45272 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -120,11 +120,10 @@ nsString::~nsString() {
|
||||
nsStr::Destroy(*this,mAgent);
|
||||
}
|
||||
|
||||
void nsString::SizeOf(nsISizeOfHandler* aHandler) const {
|
||||
#ifndef RICKG_TESTBED
|
||||
aHandler->Add(sizeof(*this));
|
||||
aHandler->Add(mCapacity << mCharSize);
|
||||
#endif
|
||||
void nsString::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const {
|
||||
if (aResult) {
|
||||
*aResult = sizeof(*this) + mCapacity * mCharSize;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2132,11 +2131,10 @@ nsAutoString::nsAutoString( nsSubsumeStr& aSubsumeStr) :nsString(aSubsumeStr.mCh
|
||||
nsAutoString::~nsAutoString(){
|
||||
}
|
||||
|
||||
void nsAutoString::SizeOf(nsISizeOfHandler* aHandler) const {
|
||||
#ifndef RICKG_TESTBED
|
||||
aHandler->Add(sizeof(*this));
|
||||
aHandler->Add(mCapacity << mCharSize);
|
||||
#endif
|
||||
void nsAutoString::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const {
|
||||
if (aResult) {
|
||||
*aResult = sizeof(*this) + mCapacity * mCharSize;
|
||||
}
|
||||
}
|
||||
|
||||
nsSubsumeStr::nsSubsumeStr(nsStr& aString) : nsString(aString.mCharSize) {
|
||||
|
||||
Reference in New Issue
Block a user