diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 09:45:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 11:33:00 +0200 |
commit | 957a66e58444a2ac4bb77d978fd08e84fceffc38 (patch) | |
tree | a90e9a82cda5b786a7322c6bb4b37cea10819dec /include/comphelper/seqstream.hxx | |
parent | f107e6893491bdf9e9bd1a8620218640ea76095a (diff) |
osl::Mutex->std::mutex in SequenceInputStream
also
(*) check params before taking mutex to minimise the time holding the
mutex
(*) some methods were missing a lock_guard
Change-Id: Iac35328e67f81b38c896f7c1e2a3514b813656c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119696
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/comphelper/seqstream.hxx')
-rw-r--r-- | include/comphelper/seqstream.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/comphelper/seqstream.hxx b/include/comphelper/seqstream.hxx index 6ea3ebc2c777..88db729832c5 100644 --- a/include/comphelper/seqstream.hxx +++ b/include/comphelper/seqstream.hxx @@ -27,6 +27,7 @@ #include <osl/mutex.hxx> #include <cppuhelper/implbase.hxx> #include <comphelper/comphelperdllapi.h> +#include <mutex> namespace comphelper { @@ -39,7 +40,7 @@ namespace comphelper class COMPHELPER_DLLPUBLIC SequenceInputStream final : public ::cppu::WeakImplHelper< css::io::XInputStream, css::io::XSeekable > { - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; css::uno::Sequence<sal_Int8> const m_aData; sal_Int32 m_nPos; @@ -62,7 +63,7 @@ public: virtual sal_Int64 SAL_CALL getLength( ) override; private: - inline sal_Int32 avail(); + sal_Int32 avail(); }; // don't export to avoid duplicate WeakImplHelper definitions with MSVC |