diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-18 20:49:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-20 17:52:17 +0100 |
commit | 361b1aaae1d69a642e2735c862d4fe9243ea4646 (patch) | |
tree | 97bdf54e996126624b1cd72bfd1e166e0ac8a5fb /i18npool | |
parent | dab35c152af3345786b8335e83cd067b67d08b81 (diff) |
osl::Mutex->std::mutex in TextSearch
Change-Id: Id424d7b0d2eee12eb53d9dda4445189526b63d2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/search/textsearch.cxx | 8 | ||||
-rw-r--r-- | i18npool/source/search/textsearch.hxx | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index c5e48a12b4c0..1df286dfcd35 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -116,7 +116,7 @@ TextSearch::~TextSearch() void TextSearch::setOptions2( const SearchOptions2& rOptions ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); aSrchPara = rOptions; @@ -264,8 +264,6 @@ void TextSearch::setOptions2( const SearchOptions2& rOptions ) void TextSearch::setOptions( const SearchOptions& rOptions ) { - osl::MutexGuard g(m_aMutex); - sal_Int16 nAlgorithmType2; switch (rOptions.algorithmType) { @@ -316,7 +314,7 @@ bool TextSearch::isCellStart(const OUString& searchStr, sal_Int32 nPos) SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 startPos, sal_Int32 endPos ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); SearchResult sres; @@ -455,7 +453,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta SearchResult TextSearch::searchBackward( const OUString& searchStr, sal_Int32 startPos, sal_Int32 endPos ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); SearchResult sres; diff --git a/i18npool/source/search/textsearch.hxx b/i18npool/source/search/textsearch.hxx index 5b3dcd05179e..d03a1047769b 100644 --- a/i18npool/source/search/textsearch.hxx +++ b/i18npool/source/search/textsearch.hxx @@ -26,6 +26,7 @@ #include <map> #include <memory> +#include <mutex> #include <unicode/regex.h> #include <unicode/unistr.h> @@ -48,7 +49,7 @@ class TextSearch: public cppu::WeakImplHelper css::lang::XServiceInfo > { - osl::Mutex m_aMutex; + std::mutex m_aMutex; css::uno::Reference < css::uno::XComponentContext > m_xContext; css::util::SearchOptions2 aSrchPara; |