diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-02-28 14:34:05 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-02-28 14:34:05 +0000 |
commit | c3b9a28f282e0d3bc7219d2d59f5566491fbd8dd (patch) | |
tree | 0be62db30528a2ba8dd3b463e7a2a571313bc58f /cppu | |
parent | 7a80833b4860456d60a61670c36636e7b3e80912 (diff) |
optimized inline query interface
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/inc/com/sun/star/uno/Reference.hxx | 10 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/genfunc.hxx | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx index d76cb27fe961..c4cd49758eab 100644 --- a/cppu/inc/com/sun/star/uno/Reference.hxx +++ b/cppu/inc/com/sun/star/uno/Reference.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Reference.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-16 16:38:07 $ + * last change: $Author: dbo $ $Date: 2001-02-28 15:34:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -172,10 +172,10 @@ inline XInterface * Reference< interface_type >::__query( { const Type & rType = ::getCppuType( (const Reference< interface_type > *)0 ); Any aRet( pInterface->queryInterface( rType ) ); - if (aRet.hasValue()) + if (typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass) { - XInterface * pRet = * reinterpret_cast< XInterface * const * >( aRet.getValue() ); - pRet->acquire(); + XInterface * pRet = * reinterpret_cast< XInterface ** >( aRet.pData ); + * reinterpret_cast< XInterface ** >( aRet.pData ) = 0; return pRet; } } diff --git a/cppu/inc/com/sun/star/uno/genfunc.hxx b/cppu/inc/com/sun/star/uno/genfunc.hxx index 713eeba55160..c0be5204a52e 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.hxx +++ b/cppu/inc/com/sun/star/uno/genfunc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: genfunc.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:16:24 $ + * last change: $Author: dbo $ $Date: 2001-02-28 15:34:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,10 +108,10 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription #endif Any aRet( reinterpret_cast< XInterface * >( pCppI )->queryInterface( * reinterpret_cast< const Type * >( &pType ) ) ); - if (aRet.hasValue()) + if (typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass) { - XInterface * pRet = * reinterpret_cast< XInterface * const * >( aRet.getValue() ); - pRet->acquire(); + XInterface * pRet = * reinterpret_cast< XInterface ** >( aRet.pData ); + * reinterpret_cast< XInterface ** >( aRet.pData ) = 0; return pRet; } #ifndef EXCEPTIONS_OFF |