fix -pedantic bustage - Delete isn't const, so re-cast "this"

This commit is contained in:
alecf%netscape.com 1999-02-26 17:56:44 +00:00
parent f3c2021803
commit 51d9e33467
2 changed files with 4 additions and 2 deletions

View File

@ -281,7 +281,8 @@ nsresult nsFileSpec::Move(const nsFileSpec& inNewParentDirectory) const
result = NS_FILE_RESULT(CrudeFileCopy(*this, destPath));
if (result == NS_OK)
{
Delete(PR_FALSE);
// cast to fix const-ness
((nsFileSpec*)this)->Delete(PR_FALSE);
}
delete [] destPath;
}

View File

@ -281,7 +281,8 @@ nsresult nsFileSpec::Move(const nsFileSpec& inNewParentDirectory) const
result = NS_FILE_RESULT(CrudeFileCopy(*this, destPath));
if (result == NS_OK)
{
Delete(PR_FALSE);
// cast to fix const-ness
((nsFileSpec*)this)->Delete(PR_FALSE);
}
delete [] destPath;
}