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:
@@ -141,11 +141,10 @@ nsCString::~nsCString() {
|
||||
nsStr::Destroy(*this,mAgent);
|
||||
}
|
||||
|
||||
void nsCString::SizeOf(nsISizeOfHandler* aHandler) const {
|
||||
#ifndef RICKG_TESTBED
|
||||
aHandler->Add(sizeof(*this));
|
||||
aHandler->Add(mCapacity << mCharSize);
|
||||
#endif
|
||||
void nsCString::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const {
|
||||
if (aResult) {
|
||||
*aResult = sizeof(*this) + mCapacity * mCharSize;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1848,11 +1847,10 @@ nsCAutoString::nsCAutoString( nsSubsumeCStr& aSubsumeStr) :nsCString() {
|
||||
nsCAutoString::~nsCAutoString(){
|
||||
}
|
||||
|
||||
void nsCAutoString::SizeOf(nsISizeOfHandler* aHandler) const {
|
||||
#ifndef RICKG_TESTBED
|
||||
aHandler->Add(sizeof(*this));
|
||||
aHandler->Add(mCapacity << mCharSize);
|
||||
#endif
|
||||
void nsCAutoString::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const {
|
||||
if (aResult) {
|
||||
*aResult = sizeof(*this) + mCapacity * mCharSize;
|
||||
}
|
||||
}
|
||||
|
||||
nsSubsumeCStr::nsSubsumeCStr(nsStr& aString) : nsCString() {
|
||||
|
||||
Reference in New Issue
Block a user