IncrementModCount now takes a PRInt32 (this fixes broken builds).

This commit is contained in:
sfraser%netscape.com 1999-05-12 22:55:29 +00:00
parent 6ce4f6cf2c
commit ee19d4ead5
5 changed files with 11 additions and 22 deletions

View File

@ -726,12 +726,6 @@ nsDocument::~nsDocument()
NS_IF_RELEASE(mLineBreaker);
NS_IF_RELEASE(mWordBreaker);
#ifdef DEBUG
if (mModCount > 0)
{
NS_WARNING("Disposing an unsaved modified document");
}
#endif
delete mFileSpec;
}
@ -2865,9 +2859,10 @@ nsDocument::ResetModCount()
}
NS_IMETHODIMP
nsDocument::IncrementModCount()
nsDocument::IncrementModCount(PRInt32 aNumMods)
{
mModCount++;
mModCount += aNumMods;
NS_ASSERTION(mModCount >= 0, "Modification count went negative");
return NS_OK;
}

View File

@ -371,7 +371,7 @@ public:
NS_IMETHOD GetFileSpec(nsFileSpec& aFileSpec);
NS_IMETHOD GetModCount(PRInt32 *outModCount);
NS_IMETHOD ResetModCount();
NS_IMETHOD IncrementModCount();
NS_IMETHOD IncrementModCount(PRInt32 aNumMods);
// nsIDOMEventTarget interface
NS_IMETHOD AddEventListener(const nsString& aType, nsIDOMEventListener* aListener,

View File

@ -98,11 +98,10 @@ public:
*/
NS_IMETHOD ResetModCount()=0;
/** Increment the modification count for the document.
* this marks the documents as 'dirty' and
* in need of saving.
/** Increment the modification count for the document by the given
* amount (which may be -ve).
*/
NS_IMETHOD IncrementModCount()=0;
NS_IMETHOD IncrementModCount(PRInt32 aNumMods)=0;
};

View File

@ -726,12 +726,6 @@ nsDocument::~nsDocument()
NS_IF_RELEASE(mLineBreaker);
NS_IF_RELEASE(mWordBreaker);
#ifdef DEBUG
if (mModCount > 0)
{
NS_WARNING("Disposing an unsaved modified document");
}
#endif
delete mFileSpec;
}
@ -2865,9 +2859,10 @@ nsDocument::ResetModCount()
}
NS_IMETHODIMP
nsDocument::IncrementModCount()
nsDocument::IncrementModCount(PRInt32 aNumMods)
{
mModCount++;
mModCount += aNumMods;
NS_ASSERTION(mModCount >= 0, "Modification count went negative");
return NS_OK;
}

View File

@ -371,7 +371,7 @@ public:
NS_IMETHOD GetFileSpec(nsFileSpec& aFileSpec);
NS_IMETHOD GetModCount(PRInt32 *outModCount);
NS_IMETHOD ResetModCount();
NS_IMETHOD IncrementModCount();
NS_IMETHOD IncrementModCount(PRInt32 aNumMods);
// nsIDOMEventTarget interface
NS_IMETHOD AddEventListener(const nsString& aType, nsIDOMEventListener* aListener,