removed static vars

git-svn-id: svn://10.0.0.236/trunk@24431 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-03-19 08:47:20 +00:00
parent ae04462df2
commit e635708ea1
8 changed files with 32 additions and 4 deletions

View File

@@ -41,8 +41,9 @@ const char* kFoolMsg = "Error: Some fool overwrote the shared buffer.";
PRUnichar kCommonEmptyBuffer[100]; //shared by all strings; NEVER WRITE HERE!!!
#ifdef NS_DEBUG
PRBool nsString::mSelfTested = PR_FALSE;
#endif
#define NOT_USED 0xfffd
@@ -171,10 +172,12 @@ nsString::nsString() {
NS_ASSERTION(kCommonEmptyBuffer[0]==0,kFoolMsg);
mLength = mCapacity = 0;
mStr = kCommonEmptyBuffer;
#ifdef NS_DEBUG
if(!mSelfTested) {
mSelfTested=PR_TRUE;
SelfTest();
}
#endif
}
@@ -2208,7 +2211,9 @@ void nsString::SelfTest(void) {
static const char* kComparisonError = "Comparision error!";
static const char* kEqualsError = "Equals error!";
#ifdef NS_DEBUG
mSelfTested=PR_TRUE;
#endif
nsAutoString as("Hello there");
as.SelfTest();