[Libreoffice-commits] core.git: dtrans/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 12 07:02:48 UTC 2018


 dtrans/source/cnttype/mcnttype.cxx |    6 ------
 dtrans/source/cnttype/mcnttype.hxx |    1 -
 2 files changed, 7 deletions(-)

New commits:
commit a0ed677fbc17ac9daea42d6264982c62a4a2f338
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Oct 11 23:13:14 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Oct 12 09:02:18 2018 +0200

    Remove unnecessary mutex
    
    CMimeContentType::m_ParameterMap isn't modified after construction
    
    Change-Id: Ib3dbfbd4212ed0d7e8a9f29c655f935d3fc4f1bf
    Reviewed-on: https://gerrit.libreoffice.org/61698
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 483806163bea..4ba1a295fd8a 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -28,7 +28,6 @@
 using namespace com::sun::star::uno;
 using namespace com::sun::star::container;
 using namespace std;
-using namespace osl;
 
 CMimeContentType::CMimeContentType( const OUString& aCntType )
 {
@@ -52,8 +51,6 @@ OUString SAL_CALL CMimeContentType::getFullMediaType( )
 
 Sequence< OUString > SAL_CALL CMimeContentType::getParameters( )
 {
-    MutexGuard aGuard( m_aMutex );
-
     Sequence< OUString > seqParams;
 
     map< OUString, OUString >::iterator iter;
@@ -70,7 +67,6 @@ Sequence< OUString > SAL_CALL CMimeContentType::getParameters( )
 
 sal_Bool SAL_CALL CMimeContentType::hasParameter( const OUString& aName )
 {
-    MutexGuard aGuard( m_aMutex );
     return ( m_ParameterMap.end( ) != m_ParameterMap.find( aName.toAsciiLowerCase() ) );
 }
 
@@ -78,8 +74,6 @@ OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName )
 {
     auto const lower = aName.toAsciiLowerCase();
 
-    MutexGuard aGuard( m_aMutex );
-
     if ( !hasParameter( lower ) )
         throw NoSuchElementException( );
 
diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx
index 07ff21a944d8..6b2dd4c8e925 100644
--- a/dtrans/source/cnttype/mcnttype.hxx
+++ b/dtrans/source/cnttype/mcnttype.hxx
@@ -51,7 +51,6 @@ private:
     void init( const OUString& aCntType );
 
 private:
-    ::osl::Mutex                             m_aMutex;
     OUString                            m_MediaType;
     OUString                            m_MediaSubtype;
     std::map< OUString, OUString > m_ParameterMap;


More information about the Libreoffice-commits mailing list