summaryrefslogtreecommitdiffstats
path: root/binaryurp/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 11:36:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 12:20:53 +0200
commit05ab38359ae72f2a54dc0b5f1b84ac5f649c507a (patch)
tree5830c7ee2442984e0bc804def7bd95ddd8a25410 /binaryurp/source
parentPass context and resource string down to boost::locale separately (diff)
downloadcore-05ab38359ae72f2a54dc0b5f1b84ac5f649c507a.tar.gz
core-05ab38359ae72f2a54dc0b5f1b84ac5f649c507a.zip
Consolidate on C++17 std::scoped_lock instead of std::lock_guard
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'binaryurp/source')
-rw-r--r--binaryurp/source/outgoingrequests.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/binaryurp/source/outgoingrequests.cxx b/binaryurp/source/outgoingrequests.cxx
index ed15e5a1bda8..3cdc80e82bb2 100644
--- a/binaryurp/source/outgoingrequests.cxx
+++ b/binaryurp/source/outgoingrequests.cxx
@@ -37,12 +37,12 @@ OutgoingRequests::~OutgoingRequests() {}
void OutgoingRequests::push(
rtl::ByteSequence const & tid, OutgoingRequest const & request)
{
- std::lock_guard g(mutex_);
+ std::scoped_lock g(mutex_);
map_[tid].push_back(request);
}
OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) {
- std::lock_guard g(mutex_);
+ std::scoped_lock g(mutex_);
Map::iterator i(map_.find(tid));
if (i == map_.end()) {
throw css::uno::RuntimeException(
@@ -53,7 +53,7 @@ OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) {
}
void OutgoingRequests::pop(rtl::ByteSequence const & tid) noexcept {
- std::lock_guard g(mutex_);
+ std::scoped_lock g(mutex_);
Map::iterator i(map_.find(tid));
assert(i != map_.end());
i->second.pop_back();