Remove static IID kISupportsIID from the default QueryInterfaces implementation macro. Replace with call to nsISupports::GetIID(). Tested by dp, myself and tague on the 3 main platforms (Win32, Linux and Mac respectively).

This commit is contained in:
bruce%cybersight.com 1999-05-29 16:25:18 +00:00
Родитель 288da9f9ef
Коммит 2c4766ddbd
2 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -243,14 +243,13 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
\
*aInstancePtr = NULL; \
\
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); \
static NS_DEFINE_IID(kClassIID, _classiiddef); \
if (aIID.Equals(kClassIID)) { \
*aInstancePtr = (void*) this; \
NS_ADDREF_THIS(); \
return NS_OK; \
} \
if (aIID.Equals(kISupportsIID)) { \
if (aIID.Equals(nsISupports::GetIID())) { \
*aInstancePtr = (void*) ((nsISupports*)this); \
NS_ADDREF_THIS(); \
return NS_OK; \

Просмотреть файл

@ -243,14 +243,13 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
\
*aInstancePtr = NULL; \
\
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); \
static NS_DEFINE_IID(kClassIID, _classiiddef); \
if (aIID.Equals(kClassIID)) { \
*aInstancePtr = (void*) this; \
NS_ADDREF_THIS(); \
return NS_OK; \
} \
if (aIID.Equals(kISupportsIID)) { \
if (aIID.Equals(nsISupports::GetIID())) { \
*aInstancePtr = (void*) ((nsISupports*)this); \
NS_ADDREF_THIS(); \
return NS_OK; \