From f22a9447c58f2026bc765286a626b3b746977f19 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 12 Jan 2023 11:06:42 +0300 Subject: Simplify a bit Change-Id: I8e86aa5a43f7c0bc234331def1b4440dbe2cefa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145389 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- animations/source/animcore/animcore.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'animations') diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 05b3ae010561..a22c413e64f8 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -2015,15 +2015,13 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference Guard< Mutex > aGuard( m_aMutex ); if( !newChild.is() ) - throw IllegalArgumentException("no child", static_cast(this), 1); + throw IllegalArgumentException("no child", xThis, 1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) - throw ElementExistException(); + throw ElementExistException({}, xThis); - Reference< XInterface > xChild( newChild ); - - if( xThis == xChild ) - throw IllegalArgumentException("cannot append self", static_cast(this), -1); + if( xThis == newChild ) + throw IllegalArgumentException("cannot append self", xThis, -1); maChildren.push_back( newChild ); } -- cgit