diff --git a/mozilla/xpcom/base/nsCOMPtr.h b/mozilla/xpcom/base/nsCOMPtr.h index 0d72c7af80c..230a6344009 100644 --- a/mozilla/xpcom/base/nsCOMPtr.h +++ b/mozilla/xpcom/base/nsCOMPtr.h @@ -637,19 +637,17 @@ SameCOMIdentity( nsISupports* lhs, nsISupports* rhs ) #endif // defined(NSCAP_FEATURE_ALLOW_COMPARISONS) -#if 0 -template +template inline nsresult -CallQueryInterface( SourceType* aSource, nsCOMPtr* aDestination ) +CallQueryInterface( nsISupports* aSource, nsCOMPtr* 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___) diff --git a/mozilla/xpcom/base/nsISupportsUtils.h b/mozilla/xpcom/base/nsISupportsUtils.h index e189bcdc59d..56cba8128cc 100644 --- a/mozilla/xpcom/base/nsISupportsUtils.h +++ b/mozilla/xpcom/base/nsISupportsUtils.h @@ -671,15 +671,15 @@ extern "C++" { class nsISupports; -template +template 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++" diff --git a/mozilla/xpcom/glue/nsCOMPtr.h b/mozilla/xpcom/glue/nsCOMPtr.h index 0d72c7af80c..230a6344009 100644 --- a/mozilla/xpcom/glue/nsCOMPtr.h +++ b/mozilla/xpcom/glue/nsCOMPtr.h @@ -637,19 +637,17 @@ SameCOMIdentity( nsISupports* lhs, nsISupports* rhs ) #endif // defined(NSCAP_FEATURE_ALLOW_COMPARISONS) -#if 0 -template +template inline nsresult -CallQueryInterface( SourceType* aSource, nsCOMPtr* aDestination ) +CallQueryInterface( nsISupports* aSource, nsCOMPtr* 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___) diff --git a/mozilla/xpcom/glue/nsISupportsUtils.h b/mozilla/xpcom/glue/nsISupportsUtils.h index e189bcdc59d..56cba8128cc 100644 --- a/mozilla/xpcom/glue/nsISupportsUtils.h +++ b/mozilla/xpcom/glue/nsISupportsUtils.h @@ -671,15 +671,15 @@ extern "C++" { class nsISupports; -template +template 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++" diff --git a/mozilla/xpcom/public/nsCOMPtr.h b/mozilla/xpcom/public/nsCOMPtr.h index 0d72c7af80c..230a6344009 100644 --- a/mozilla/xpcom/public/nsCOMPtr.h +++ b/mozilla/xpcom/public/nsCOMPtr.h @@ -637,19 +637,17 @@ SameCOMIdentity( nsISupports* lhs, nsISupports* rhs ) #endif // defined(NSCAP_FEATURE_ALLOW_COMPARISONS) -#if 0 -template +template inline nsresult -CallQueryInterface( SourceType* aSource, nsCOMPtr* aDestination ) +CallQueryInterface( nsISupports* aSource, nsCOMPtr* 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___) diff --git a/mozilla/xpcom/public/nsISupportsUtils.h b/mozilla/xpcom/public/nsISupportsUtils.h index e189bcdc59d..56cba8128cc 100644 --- a/mozilla/xpcom/public/nsISupportsUtils.h +++ b/mozilla/xpcom/public/nsISupportsUtils.h @@ -671,15 +671,15 @@ extern "C++" { class nsISupports; -template +template 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++"