diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-29 12:43:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-30 06:57:26 +0000 |
commit | 4d87443bf59c3242d58b56cc1583d73213ae1f2f (patch) | |
tree | c1f74fc569506299100b5063f14c09e46035a943 /toolkit | |
parent | 8e812b87ff7f8c5bf2c6f8858646c55effd2eea3 (diff) |
loplugin:constantparam
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c
Reviewed-on: https://gerrit.libreoffice.org/29321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/tree/treedatamodel.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx index e952a2a328e4..fb415b5267ef 100644 --- a/toolkit/source/controls/tree/treedatamodel.cxx +++ b/toolkit/source/controls/tree/treedatamodel.cxx @@ -44,11 +44,6 @@ typedef rtl::Reference< MutableTreeNode > MutableTreeNodeRef; typedef std::vector< MutableTreeNodeRef > TreeNodeVector; typedef rtl::Reference< MutableTreeDataModel > MutableTreeDataModelRef; -void implThrowIllegalArgumentException() throw( IllegalArgumentException ) -{ - throw IllegalArgumentException(); -} - class MutableTreeDataModel : public ::cppu::WeakAggImplHelper2< XMutableTreeDataModel, XServiceInfo >, public MutexAndBroadcastHelper { @@ -122,7 +117,7 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception) override; virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException, std::exception) override; - static MutableTreeNode* getImplementation( const Reference< XTreeNode >& xNode, bool bThrows ) throw (IllegalArgumentException); + static MutableTreeNode* getImplementation( const Reference< XTreeNode >& xNode ); static Reference< XTreeNode > getReference( MutableTreeNode* pNode ) { return Reference< XTreeNode >( pNode ); @@ -283,13 +278,9 @@ void MutableTreeNode::setParent( MutableTreeNode* pParent ) mpParent = pParent; } -MutableTreeNode* MutableTreeNode::getImplementation( const Reference< XTreeNode >& xNode, bool bThrows ) throw (IllegalArgumentException) +MutableTreeNode* MutableTreeNode::getImplementation( const Reference< XTreeNode >& xNode ) { - MutableTreeNode* pImpl = dynamic_cast< MutableTreeNode* >( xNode.get() ); - if( bThrows && !pImpl ) - implThrowIllegalArgumentException(); - - return pImpl; + return dynamic_cast< MutableTreeNode* >( xNode.get() ); } void MutableTreeNode::broadcast_changes() @@ -478,7 +469,7 @@ sal_Int32 SAL_CALL MutableTreeNode::getIndex( const Reference< XTreeNode >& xNod { ::osl::Guard< ::osl::Mutex > aGuard( maMutex ); - MutableTreeNodeRef xImpl( MutableTreeNode::getImplementation( xNode, false ) ); + MutableTreeNodeRef xImpl( MutableTreeNode::getImplementation( xNode ) ); if( xImpl.is() ) { sal_Int32 nChildCount = maChildren.size(); |