diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-10-04 08:43:01 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-10-04 13:44:32 +0200 |
commit | 1d11f80148a3aef22bef2f4a15ddaa75b57a8673 (patch) | |
tree | af5067ff9ba733b56050e9edc6f8ff6ae08f1a2c /connectivity | |
parent | 89a75cd194371002247d0138e759835bc673f7b0 (diff) |
Replace useless throwNoSuchElementException function
by its straightforward and short content.
Change-Id: Ic847f12923e71addf00b7b16546c8168cf3952f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157552
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/manager/mdrivermanager.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index c4b884cc973b..5c283be5d82d 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -51,12 +51,6 @@ using namespace ::osl; constexpr OUStringLiteral SERVICE_SDBC_DRIVER = u"com.sun.star.sdbc.Driver"; -/// @throws NoSuchElementException -static void throwNoSuchElementException() -{ - throw NoSuchElementException(); -} - class ODriverEnumeration : public ::cppu::WeakImplHelper< XEnumeration > { friend class OSDBCDriverManager; @@ -98,7 +92,7 @@ sal_Bool SAL_CALL ODriverEnumeration::hasMoreElements( ) Any SAL_CALL ODriverEnumeration::nextElement( ) { if ( !hasMoreElements() ) - throwNoSuchElementException(); + throw NoSuchElementException(); return Any( *m_aPos++ ); } @@ -518,7 +512,7 @@ Reference< XInterface > SAL_CALL OSDBCDriverManager::getRegisteredObject( const MutexGuard aGuard(m_aMutex); DriverCollection::const_iterator aSearch = m_aDriversRT.find(_rName); if (aSearch == m_aDriversRT.end()) - throwNoSuchElementException(); + throw NoSuchElementException(); return aSearch->second; } @@ -560,7 +554,7 @@ void SAL_CALL OSDBCDriverManager::revokeObject( const OUString& _rName ) DriverCollection::iterator aSearch = m_aDriversRT.find(_rName); if (aSearch == m_aDriversRT.end()) - throwNoSuchElementException(); + throw NoSuchElementException(); m_aDriversRT.erase(aSearch); // we already have the iterator so we could use it |