diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:16:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:27 +0100 |
commit | 06c5c630201152964c19c47262a5a54fcb6cf6c2 (patch) | |
tree | 909d2d883848f87711d723ddf354dba6f79d0748 /framework/source/fwi | |
parent | 88b5e5fd3a6f0d70caf66568c25a3e47e01c71e2 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: Ie178c474921c1695927a9b01a9972baf09fbb73d
Diffstat (limited to 'framework/source/fwi')
5 files changed, 27 insertions, 27 deletions
diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx index 46a42662351e..dde6ceba0886 100644 --- a/framework/source/fwi/classes/protocolhandlercache.cxx +++ b/framework/source/fwi/classes/protocolhandlercache.cxx @@ -68,10 +68,10 @@ PatternHash::iterator PatternHash::findPatternKey( const OUString& sURL ) That means it use two static member list to hold all necessary information and a ref count mechanism to create/destroy it on demand. */ -HandlerHash* HandlerCache::m_pHandler = NULL; -PatternHash* HandlerCache::m_pPattern = NULL; +HandlerHash* HandlerCache::m_pHandler = nullptr; +PatternHash* HandlerCache::m_pPattern = nullptr; sal_Int32 HandlerCache::m_nRefCount = 0; -HandlerCFGAccess* HandlerCache::m_pConfig = NULL; +HandlerCFGAccess* HandlerCache::m_pConfig = nullptr; /** @short ctor of the cache of all registered protocol handler @@ -107,16 +107,16 @@ HandlerCache::~HandlerCache() if( m_nRefCount==1) { - m_pConfig->setCache(NULL); + m_pConfig->setCache(nullptr); m_pHandler->free(); m_pPattern->free(); delete m_pConfig; delete m_pHandler; delete m_pPattern; - m_pConfig = NULL; - m_pHandler= NULL; - m_pPattern= NULL; + m_pConfig = nullptr; + m_pHandler= nullptr; + m_pPattern= nullptr; } --m_nRefCount; @@ -180,7 +180,7 @@ void HandlerCache::takeOver(HandlerHash* pHandler, PatternHash* pPattern) */ HandlerCFGAccess::HandlerCFGAccess( const OUString& sPackage ) : ConfigItem(sPackage) - , m_pCache(0) + , m_pCache(nullptr) { css::uno::Sequence< OUString > lListenPaths(1); lListenPaths[0] = SETNAME_HANDLER; diff --git a/framework/source/fwi/helper/networkdomain.cxx b/framework/source/fwi/helper/networkdomain.cxx index c52c2ec44bc4..bf3f643f8a27 100644 --- a/framework/source/fwi/helper/networkdomain.cxx +++ b/framework/source/fwi/helper/networkdomain.cxx @@ -130,7 +130,7 @@ static rtl_uString *getDomainName() static rtl_uString *getDomainName() { /* Initialize and assume failure */ - rtl_uString *ustrDomainName = NULL; + rtl_uString *ustrDomainName = nullptr; char buffer[256]; // actually the man page says 65 bytes should be enough diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 28ad0f1771ea..dfdeb6eeca5c 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -151,7 +151,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference if ( rSubContainer.is() ) { ItemContainer* pSource = ItemContainer::GetImplementation( rSubContainer ); - ConstItemContainer* pSubContainer( 0 ); + ConstItemContainer* pSubContainer( nullptr ); if ( pSource ) pSubContainer = new ConstItemContainer( *pSource ); else @@ -186,7 +186,7 @@ ConstItemContainer* ConstItemContainer::GetImplementation( const css::uno::Refer { css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY ); return xUT.is() ? reinterpret_cast< ConstItemContainer* >(sal::static_int_cast< sal_IntPtr >( - xUT->getSomething( ConstItemContainer::GetUnoTunnelId() ))) : NULL; + xUT->getSomething( ConstItemContainer::GetUnoTunnelId() ))) : nullptr; } // XElementAccess @@ -219,14 +219,14 @@ throw (css::uno::RuntimeException, std::exception) // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static Reference< XPropertySetInfo >* pInfo = NULL; + static Reference< XPropertySetInfo >* pInfo = nullptr; - if( pInfo == NULL ) + if( pInfo == nullptr ) { // Ready for multithreading osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ); // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) + if( pInfo == nullptr ) { // Create structure of propertysetinfo for baseclass "OPropertySetHelper". // (Use method "getInfoHelper()".) @@ -295,15 +295,15 @@ throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; + static ::cppu::OPropertyArrayHelper* pInfoHelper = nullptr; - if( pInfoHelper == NULL ) + if( pInfoHelper == nullptr ) { // Ready for multithreading osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ); // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) + if( pInfoHelper == nullptr ) { // Define static member to give structure of properties to baseclass "OPropertySetHelper". // "impl_getStaticPropertyDescriptor" is a non exported and static function, who will define a static propertytable. diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx index 2abde0fd4e07..239f4027acba 100644 --- a/framework/source/fwi/uielement/itemcontainer.cxx +++ b/framework/source/fwi/uielement/itemcontainer.cxx @@ -118,7 +118,7 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn if ( rSubContainer.is() ) { ConstItemContainer* pSource = ConstItemContainer::GetImplementation( rSubContainer ); - ItemContainer* pSubContainer( 0 ); + ItemContainer* pSubContainer( nullptr ); if ( pSource ) pSubContainer = new ItemContainer( *pSource, rMutex ); else @@ -143,7 +143,7 @@ ItemContainer* ItemContainer::GetImplementation( const css::uno::Reference< css: { css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY ); return xUT.is() ? reinterpret_cast< ItemContainer* >(sal::static_int_cast< sal_IntPtr >( - xUT->getSomething( ItemContainer::GetUnoTunnelId() ))) : NULL; + xUT->getSomething( ItemContainer::GetUnoTunnelId() ))) : nullptr; } // XElementAccess diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 93eb5d140e25..1ce57fb0d02d 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -128,7 +128,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< if ( rSubContainer.is() ) { ConstItemContainer* pSource = ConstItemContainer::GetImplementation( rSubContainer ); - ItemContainer* pSubContainer( 0 ); + ItemContainer* pSubContainer( nullptr ); if ( pSource ) pSubContainer = new ItemContainer( *pSource, m_aShareMutex ); else @@ -161,7 +161,7 @@ RootItemContainer* RootItemContainer::GetImplementation( const css::uno::Referen { css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY ); return xUT.is() ? reinterpret_cast< RootItemContainer* >(sal::static_int_cast< sal_IntPtr >( - xUT->getSomething( RootItemContainer::GetUnoTunnelId() ))) : NULL; + xUT->getSomething( RootItemContainer::GetUnoTunnelId() ))) : nullptr; } // XElementAccess @@ -307,15 +307,15 @@ void SAL_CALL RootItemContainer::getFastPropertyValue( css::uno::Any& aValue , // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! // For the first call; pInfoHelper is NULL - for the second call pInfoHelper is different from NULL! - static ::cppu::OPropertyArrayHelper* pInfoHelper = NULL; + static ::cppu::OPropertyArrayHelper* pInfoHelper = nullptr; - if( pInfoHelper == NULL ) + if( pInfoHelper == nullptr ) { // Ready for multithreading osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ); // Control this pointer again, another instance can be faster then these! - if( pInfoHelper == NULL ) + if( pInfoHelper == nullptr ) { // Define static member to give structure of properties to baseclass "OPropertySetHelper". // "impl_getStaticPropertyDescriptor" is a non exported and static function, who will define a static propertytable. @@ -334,14 +334,14 @@ throw (css::uno::RuntimeException, std::exception) // Optimize this method ! // We initialize a static variable only one time. And we don't must use a mutex at every call! // For the first call; pInfo is NULL - for the second call pInfo is different from NULL! - static css::uno::Reference< css::beans::XPropertySetInfo >* pInfo = NULL; + static css::uno::Reference< css::beans::XPropertySetInfo >* pInfo = nullptr; - if( pInfo == NULL ) + if( pInfo == nullptr ) { // Ready for multithreading osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ); // Control this pointer again, another instance can be faster then these! - if( pInfo == NULL ) + if( pInfo == nullptr ) { // Create structure of propertysetinfo for baseclass "OPropertySetHelper". // (Use method "getInfoHelper()".) |