linguistic/source/misc.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
New commits: commit 2b9afb52a96b86cb6f1aab2bdccca3b19566a8c7 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sun Jul 18 15:04:41 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Jul 18 20:47:06 2021 +0200 osl::Mutex->std::mutex in linguistic Change-Id: I9cbd3da16fa122de2f1087be11969cb204aef020 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 59214bed4500..ac9ad9de37e9 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -46,6 +46,7 @@ #include <linguistic/misc.hxx> #include <linguistic/hyphdta.hxx> +#include <mutex> using namespace osl; using namespace com::sun::star; @@ -571,15 +572,11 @@ static CharClass & lcl_GetCharClass() return aCC; } -static osl::Mutex & lcl_GetCharClassMutex() -{ - static osl::Mutex aMutex; - return aMutex; -} +static std::mutex s_GetCharClassMutex; bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, LanguageType nLanguage ) { - MutexGuard aGuard( lcl_GetCharClassMutex() ); + std::lock_guard aGuard( s_GetCharClassMutex ); CharClass &rCC = lcl_GetCharClass(); rCC.setLanguageTag( LanguageTag( nLanguage )); @@ -615,7 +612,7 @@ CapType capitalType(const OUString& aTerm, CharClass const * pCC) OUString ToLower( const OUString &rText, LanguageType nLanguage ) { - MutexGuard aGuard( lcl_GetCharClassMutex() ); + std::lock_guard aGuard( s_GetCharClassMutex ); CharClass &rCC = lcl_GetCharClass(); rCC.setLanguageTag( LanguageTag( nLanguage )); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits