Change these QueryInterface implementations to be macros, not hand rolled. No bug, r+sr=dveditz

git-svn-id: svn://10.0.0.236/trunk@188274 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2006-01-26 22:24:20 +00:00
parent 0721fe7c26
commit dc2d92314c
2 changed files with 2 additions and 65 deletions

View File

@@ -108,38 +108,7 @@ Stopwatch vsTimer;
static const char kBodyId[] = "viewsource";
static const char kBodyClassWrap[] = "wrap";
/**
* This method gets called as part of our COM-like interfaces.
* Its purpose is to create an interface to parser object
* of some type.
*
* @update gess 4/8/98
* @param nsIID id of object to discover
* @param aInstancePtr ptr to newly discovered interface
* @return NS_xxx result code
*/
nsresult CViewSourceHTML::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if(aIID.Equals(NS_GET_IID(nsISupports))) { //do IUnknown...
*aInstancePtr = (nsIDTD*)(this);
}
else if(aIID.Equals(NS_GET_IID(nsIDTD))) { //do IParser base class...
*aInstancePtr = (nsIDTD*)(this);
}
else {
*aInstancePtr=0;
return NS_NOINTERFACE;
}
NS_ADDREF_THIS();
return NS_OK;
}
NS_IMPL_ADDREF(CViewSourceHTML)
NS_IMPL_RELEASE(CViewSourceHTML)
NS_IMPL_ISUPPORTS1(CViewSourceHTML, nsIDTD)
/********************************************
********************************************/