[Libreoffice-commits] core.git: lingucomponent/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 31 12:25:41 UTC 2021
lingucomponent/source/numbertext/numbertext.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit f883bf8b655569b9897a4a237b52d424b2550cf8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 30 15:32:41 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 14:25:08 2021 +0200
osl::Mutex->std::mutex in NumberText_Impl
Change-Id: I9903a2717fe9019c45c4ecc3e7dcaed7e1a9d9f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119730
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx
index cb8e913bf571..5b9a32a65196 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -18,6 +18,7 @@
*/
#include <iostream>
+#include <mutex>
#include <osl/file.hxx>
#include <tools/debug.hxx>
@@ -47,9 +48,9 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
-static osl::Mutex& GetNumberTextMutex()
+static std::mutex& GetNumberTextMutex()
{
- static osl::Mutex aMutex;
+ static std::mutex aMutex;
return aMutex;
}
@@ -111,7 +112,7 @@ void NumberText_Impl::EnsureInitialized()
OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale& rLocale)
{
- osl::MutexGuard aGuard(GetNumberTextMutex());
+ std::lock_guard aGuard(GetNumberTextMutex());
EnsureInitialized();
// libnumbertext supports Language + Country tags (separated by "_" or "-")
LanguageTag aLanguageTag(rLocale);
@@ -141,7 +142,7 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo
uno::Sequence<Locale> SAL_CALL NumberText_Impl::getAvailableLanguages()
{
- osl::MutexGuard aGuard(GetNumberTextMutex());
+ std::lock_guard aGuard(GetNumberTextMutex());
// TODO
Sequence<css::lang::Locale> aRes;
return aRes;
More information about the Libreoffice-commits
mailing list