ucb/source/ucp/cmis/cmis_provider.cxx |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit a048c3193b3fbee3bbaa5348757d7336a32e0338
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Oct 27 00:37:19 2025 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Oct 27 05:13:03 2025 +0100

    Simplify a bit
    
    Change-Id: I05d2a3f053a13d4d6c530f20fe9a70a2ae97b84f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193006
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx 
b/ucb/source/ucp/cmis/cmis_provider.cxx
index e3f5cd080cda..7e91675d0cf9 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -60,23 +60,17 @@ ContentProvider::queryContent(
 
 libcmis::Session* ContentProvider::getSession( const OUString& sBindingUrl, 
const OUString& sUsername )
 {
-    libcmis::Session* pSession = nullptr;
-    std::map< std::pair< OUString, OUString >, libcmis::Session* >::iterator it
-            = m_aSessionCache.find( std::pair< OUString, OUString >( 
sBindingUrl, sUsername ) );
+    auto it = m_aSessionCache.find(std::make_pair(sBindingUrl, sUsername));
     if ( it != m_aSessionCache.end( ) )
     {
-        pSession = it->second;
+        return it->second;
     }
-    return pSession;
+    return nullptr;
 }
 
 void ContentProvider::registerSession( const OUString& sBindingUrl, const 
OUString& sUsername, libcmis::Session* pSession )
 {
-    m_aSessionCache.insert( std::pair< std::pair< OUString, OUString >, 
libcmis::Session* >
-                            (
-                                std::pair< OUString, OUString >( sBindingUrl, 
sUsername ),
-                                pSession
-                            ) );
+    m_aSessionCache.emplace(std::make_pair(sBindingUrl, sUsername), pSession);
 }
 
 ContentProvider::ContentProvider(

Reply via email to