Fixup CallQueryInterface

git-svn-id: svn://10.0.0.236/trunk@31239 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%netscape.com
1999-05-12 04:50:08 +00:00
parent 39cc264f6b
commit 75ac724111
6 changed files with 18 additions and 24 deletions

View File

@@ -637,19 +637,17 @@ SameCOMIdentity( nsISupports* lhs, nsISupports* rhs )
#endif // defined(NSCAP_FEATURE_ALLOW_COMPARISONS)
#if 0
template <class SourceType, class DestinationType>
template <class DestinationType>
inline
nsresult
CallQueryInterface( SourceType* aSource, nsCOMPtr<DestinationType>* aDestination )
CallQueryInterface( nsISupports* aSource, nsCOMPtr<DestinationType>* aDestination )
// a type-safe shortcut for calling the |QueryInterface()| member function
{
NS_PRECONDITION(aSource, "null parameter");
NS_PRECONDITION(aDestination, "null parameter");
return aSource->QueryInterface(DestinationType::GetIID(), NS_STATIC_CAST(void**, getter_AddRefs(*aDestination)));
return aSource->QueryInterface(DestinationType::GetIID(), (void**)getter_AddRefs(*aDestination));
}
#endif
#endif // !defined(nsCOMPtr_h___)

View File

@@ -671,15 +671,15 @@ extern "C++" {
class nsISupports;
template <class SourceType, class DestinationType>
template <class DestinationType>
inline
nsresult
CallQueryInterface( SourceType* aSource, DestinationType** aDestination )
CallQueryInterface( nsISupports* aSource, DestinationType** aDestination )
// a type-safe shortcut for calling the |QueryInterface()| member function
{
NS_PRECONDITION(aSource, "null parameter");
return aSource->QueryInterface(DestinationType::GetIID(), aDestination);
return aSource->QueryInterface(DestinationType::GetIID(), (void**)aDestination);
}
} // extern "C++"

View File

@@ -637,19 +637,17 @@ SameCOMIdentity( nsISupports* lhs, nsISupports* rhs )
#endif // defined(NSCAP_FEATURE_ALLOW_COMPARISONS)
#if 0
template <class SourceType, class DestinationType>
template <class DestinationType>
inline
nsresult
CallQueryInterface( SourceType* aSource, nsCOMPtr<DestinationType>* aDestination )
CallQueryInterface( nsISupports* aSource, nsCOMPtr<DestinationType>* aDestination )
// a type-safe shortcut for calling the |QueryInterface()| member function
{
NS_PRECONDITION(aSource, "null parameter");
NS_PRECONDITION(aDestination, "null parameter");
return aSource->QueryInterface(DestinationType::GetIID(), NS_STATIC_CAST(void**, getter_AddRefs(*aDestination)));
return aSource->QueryInterface(DestinationType::GetIID(), (void**)getter_AddRefs(*aDestination));
}
#endif
#endif // !defined(nsCOMPtr_h___)

View File

@@ -671,15 +671,15 @@ extern "C++" {
class nsISupports;
template <class SourceType, class DestinationType>
template <class DestinationType>
inline
nsresult
CallQueryInterface( SourceType* aSource, DestinationType** aDestination )
CallQueryInterface( nsISupports* aSource, DestinationType** aDestination )
// a type-safe shortcut for calling the |QueryInterface()| member function
{
NS_PRECONDITION(aSource, "null parameter");
return aSource->QueryInterface(DestinationType::GetIID(), aDestination);
return aSource->QueryInterface(DestinationType::GetIID(), (void**)aDestination);
}
} // extern "C++"

View File

@@ -637,19 +637,17 @@ SameCOMIdentity( nsISupports* lhs, nsISupports* rhs )
#endif // defined(NSCAP_FEATURE_ALLOW_COMPARISONS)
#if 0
template <class SourceType, class DestinationType>
template <class DestinationType>
inline
nsresult
CallQueryInterface( SourceType* aSource, nsCOMPtr<DestinationType>* aDestination )
CallQueryInterface( nsISupports* aSource, nsCOMPtr<DestinationType>* aDestination )
// a type-safe shortcut for calling the |QueryInterface()| member function
{
NS_PRECONDITION(aSource, "null parameter");
NS_PRECONDITION(aDestination, "null parameter");
return aSource->QueryInterface(DestinationType::GetIID(), NS_STATIC_CAST(void**, getter_AddRefs(*aDestination)));
return aSource->QueryInterface(DestinationType::GetIID(), (void**)getter_AddRefs(*aDestination));
}
#endif
#endif // !defined(nsCOMPtr_h___)

View File

@@ -671,15 +671,15 @@ extern "C++" {
class nsISupports;
template <class SourceType, class DestinationType>
template <class DestinationType>
inline
nsresult
CallQueryInterface( SourceType* aSource, DestinationType** aDestination )
CallQueryInterface( nsISupports* aSource, DestinationType** aDestination )
// a type-safe shortcut for calling the |QueryInterface()| member function
{
NS_PRECONDITION(aSource, "null parameter");
return aSource->QueryInterface(DestinationType::GetIID(), aDestination);
return aSource->QueryInterface(DestinationType::GetIID(), (void**)aDestination);
}
} // extern "C++"