summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-11-05 17:11:33 -0800
committerRosen Penev <rosenp@gmail.com>2020-11-05 18:09:30 -0800
commit071d3c71d8fc1d44064057545405235f946786d7 (patch)
tree018adc05197034bd2fcf296c4f8d18735867f541 /src/storage
parentafbcac9fb1d692f4351d57dffd3604724c22f404 (diff)
clang-tidy: replace std::bind with lambdas
Found with modernize-avoid-bind Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/plugins/UdisksStorage.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/storage/plugins/UdisksStorage.cxx b/src/storage/plugins/UdisksStorage.cxx
index 206369ea9..96db3f350 100644
--- a/src/storage/plugins/UdisksStorage.cxx
+++ b/src/storage/plugins/UdisksStorage.cxx
@@ -227,8 +227,7 @@ try {
DBUS_OM_INTERFACE,
"GetManagedObjects");
list_request.Send(connection, *msg.Get(),
- std::bind(&UdisksStorage::OnListReply,
- this, std::placeholders::_1));
+ [this](auto o) { return OnListReply(std::move(o)); });
return;
}
@@ -239,8 +238,7 @@ try {
AppendMessageIter(*msg.Get()).AppendEmptyArray<DictEntryTypeTraits<StringTypeTraits, VariantTypeTraits>>();
mount_request.Send(connection, *msg.Get(),
- std::bind(&UdisksStorage::OnMountNotify,
- this, std::placeholders::_1));
+ [this](auto o) { return OnMountNotify(std::move(o)); });
} catch (...) {
const std::lock_guard<Mutex> lock(mutex);
mount_error = std::current_exception();
@@ -297,8 +295,7 @@ try {
AppendMessageIter(*msg.Get()).AppendEmptyArray<DictEntryTypeTraits<StringTypeTraits, VariantTypeTraits>>();
mount_request.Send(connection, *msg.Get(),
- std::bind(&UdisksStorage::OnUnmountNotify,
- this, std::placeholders::_1));
+ [this](auto u) { return OnUnmountNotify(std::move(u)); });
} catch (...) {
const std::lock_guard<Mutex> lock(mutex);
mount_error = std::current_exception();