From 68d67cfe2e9c766f28298991732f20678b522493 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Mon, 14 Oct 2024 11:29:25 +0300 Subject: [PATCH] Remove unused captures from lambdas --- src/admc/console_impls/object_impl.cpp | 6 +++--- src/admc/create_object_helper.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/admc/console_impls/object_impl.cpp b/src/admc/console_impls/object_impl.cpp index a74280cc..b9cb1f12 100755 --- a/src/admc/console_impls/object_impl.cpp +++ b/src/admc/console_impls/object_impl.cpp @@ -607,7 +607,7 @@ void console_object_properties(const QList &console_list, const return out; }(); - auto apply_changes = [&ad2, &object_list](ConsoleWidget *target_console) { + auto apply_changes = [&object_list](ConsoleWidget *target_console) { auto apply_changes_to_branch = [&](const QModelIndex &root_index, const int item_type, const int update_dn_role) { if (!root_index.isValid()) { return; @@ -791,7 +791,7 @@ void console_object_delete(const QList &console_list, const QLi return out; }(); - auto apply_changes = [&ad, &deleted_list](ConsoleWidget *target_console) { + auto apply_changes = [&deleted_list](ConsoleWidget *target_console) { const QList root_list = { get_object_tree_root(target_console), get_query_tree_root(target_console), @@ -1308,7 +1308,7 @@ void console_object_move_and_rename(const QList &console_list, return out; }(); - auto apply_changes = [&ad, &old_to_new_dn_map, &old_dn_list, &new_parent_dn, &object_map](ConsoleWidget *target_console) { + auto apply_changes = [&old_to_new_dn_map, &old_dn_list, &new_parent_dn, &object_map](ConsoleWidget *target_console) { // For object tree, we add items representing // updated objects and delete old items. In the case // of move, this moves the items to their new diff --git a/src/admc/create_object_helper.cpp b/src/admc/create_object_helper.cpp index a9070122..8ee9c87c 100644 --- a/src/admc/create_object_helper.cpp +++ b/src/admc/create_object_helper.cpp @@ -113,7 +113,7 @@ bool CreateObjectHelper::accept() const { const bool is_computer = (m_object_class == CLASS_COMPUTER); if (is_user_or_person) { - const int uac = [this, dn, &ad]() { + const int uac = [dn, &ad]() { const AdObject object = ad.search_object(dn, {ATTRIBUTE_USER_ACCOUNT_CONTROL}); const int out = object.get_int(ATTRIBUTE_USER_ACCOUNT_CONTROL);