From 6b671c4b54074409bc07c12327a1bcb8ef5b265c Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 13 Mar 2024 10:42:00 -0400 Subject: [PATCH] Cleanup: Use simpler lambda capture It's typically only worth specifying specific captures when the lambda is stored as a function object for use later. Since this is just passed as a FunctionRef as an iteration callback, we can use a less complex capture here. That also helps clarify that this isn't a callback. --- source/blender/editors/asset/intern/asset_shelf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/asset/intern/asset_shelf.cc b/source/blender/editors/asset/intern/asset_shelf.cc index fde77285311..c1c91766a81 100644 --- a/source/blender/editors/asset/intern/asset_shelf.cc +++ b/source/blender/editors/asset/intern/asset_shelf.cc @@ -688,7 +688,7 @@ static void add_catalog_tabs(AssetShelfSettings &shelf_settings, uiLayout &layou /* Regular catalog tabs. */ settings_foreach_enabled_catalog_path( - shelf_settings, [&shelf_settings, block](const asset_system::AssetCatalogPath &path) { + shelf_settings, [&](const asset_system::AssetCatalogPath &path) { uiBut *but = add_tab_button(*block, path.name()); UI_but_func_set(but, [&shelf_settings, path](bContext &C) {