diff --git a/source/blender/asset_system/AS_asset_catalog.hh b/source/blender/asset_system/AS_asset_catalog.hh index ff162a85c01..45d3173b0da 100644 --- a/source/blender/asset_system/AS_asset_catalog.hh +++ b/source/blender/asset_system/AS_asset_catalog.hh @@ -58,7 +58,6 @@ class AssetCatalogService { struct read_only_tag {}; - public: explicit AssetCatalogService(const CatalogFilePath &asset_library_root = {}); explicit AssetCatalogService(read_only_tag); @@ -317,7 +316,6 @@ class AssetCatalog { bool has_unsaved_changes = false; } flags; - public: AssetCatalog() = delete; AssetCatalog(CatalogID catalog_id, const AssetCatalogPath &path, const std::string &simple_name); diff --git a/source/blender/asset_system/AS_asset_catalog_path.hh b/source/blender/asset_system/AS_asset_catalog_path.hh index 06fe68a716a..d95bef2579f 100644 --- a/source/blender/asset_system/AS_asset_catalog_path.hh +++ b/source/blender/asset_system/AS_asset_catalog_path.hh @@ -38,7 +38,7 @@ class AssetCatalogPath { /** * The path itself, such as "Agents/Secret/327". */ - std::string path_ = ""; + std::string path_; public: static const char SEPARATOR; diff --git a/source/blender/asset_system/AS_asset_library.hh b/source/blender/asset_system/AS_asset_library.hh index e8880418fae..a5155999e0d 100644 --- a/source/blender/asset_system/AS_asset_library.hh +++ b/source/blender/asset_system/AS_asset_library.hh @@ -100,7 +100,6 @@ class AssetLibrary { friend class AssetLibraryService; friend class AssetRepresentation; - public: /** * \param name: The name this asset library will be displayed in the UI as. Will also be used as * a weak way to identify an asset library (e.g. by #AssetWeakReference). Make sure diff --git a/source/blender/asset_system/intern/asset_catalog.cc b/source/blender/asset_system/intern/asset_catalog.cc index e97b36e4a67..572fbc7bb38 100644 --- a/source/blender/asset_system/intern/asset_catalog.cc +++ b/source/blender/asset_system/intern/asset_catalog.cc @@ -39,7 +39,7 @@ AssetCatalogService::AssetCatalogService(const CatalogFilePath &asset_library_ro { } -AssetCatalogService::AssetCatalogService(read_only_tag) : AssetCatalogService() +AssetCatalogService::AssetCatalogService(read_only_tag /*unused*/) : AssetCatalogService() { const_cast(is_read_only_) = true; } @@ -495,9 +495,8 @@ bool AssetCatalogService::write_to_disk_ex(const CatalogFilePath &blend_file_pat return true; /* Writing nothing when there is nothing to write is still a success. */ } - const CatalogFilePath cdf_path_to_write = this->find_suitable_cdf_path_for_writing( - blend_file_path); - catalog_collection_->catalog_definition_file_ = this->construct_cdf_in_memory(cdf_path_to_write); + const CatalogFilePath cdf_path_to_write = find_suitable_cdf_path_for_writing(blend_file_path); + catalog_collection_->catalog_definition_file_ = construct_cdf_in_memory(cdf_path_to_write); this->reload_catalogs(); return catalog_collection_->catalog_definition_file_->write_to_disk(); } diff --git a/source/blender/asset_system/intern/asset_catalog_collection.cc b/source/blender/asset_system/intern/asset_catalog_collection.cc index d3b4922c25f..03d4e48fbb8 100644 --- a/source/blender/asset_system/intern/asset_catalog_collection.cc +++ b/source/blender/asset_system/intern/asset_catalog_collection.cc @@ -17,8 +17,8 @@ std::unique_ptr AssetCatalogCollection::deep_copy() cons auto copy = std::make_unique(); copy->has_unsaved_changes_ = this->has_unsaved_changes_; - copy->catalogs_ = this->copy_catalog_map(this->catalogs_); - copy->deleted_catalogs_ = this->copy_catalog_map(this->deleted_catalogs_); + copy->catalogs_ = copy_catalog_map(this->catalogs_); + copy->deleted_catalogs_ = copy_catalog_map(this->deleted_catalogs_); if (catalog_definition_file_) { copy->catalog_definition_file_ = catalog_definition_file_->copy_and_remap( diff --git a/source/blender/asset_system/intern/asset_catalog_definition_file.hh b/source/blender/asset_system/intern/asset_catalog_definition_file.hh index 73a0b7a3501..c7d99c9677a 100644 --- a/source/blender/asset_system/intern/asset_catalog_definition_file.hh +++ b/source/blender/asset_system/intern/asset_catalog_definition_file.hh @@ -39,7 +39,6 @@ class AssetCatalogDefinitionFile { const CatalogFilePath file_path; - public: AssetCatalogDefinitionFile(const CatalogFilePath &file_path); /** diff --git a/source/blender/asset_system/intern/asset_catalog_tree.cc b/source/blender/asset_system/intern/asset_catalog_tree.cc index ed148bc25bf..afac9237cf2 100644 --- a/source/blender/asset_system/intern/asset_catalog_tree.cc +++ b/source/blender/asset_system/intern/asset_catalog_tree.cc @@ -63,7 +63,7 @@ bool AssetCatalogTreeItem::has_children() const void AssetCatalogTreeItem::foreach_item_recursive(const AssetCatalogTreeItem::ChildMap &children, const ItemIterFn callback) { - for (auto &[key, item] : children) { + for (const auto &[key, item] : children) { callback(item); foreach_item_recursive(item.children_, callback); } @@ -71,7 +71,7 @@ void AssetCatalogTreeItem::foreach_item_recursive(const AssetCatalogTreeItem::Ch void AssetCatalogTreeItem::foreach_child(const ItemIterFn callback) const { - for (auto &[key, item] : children_) { + for (const auto &[key, item] : children_) { callback(item); } } @@ -122,7 +122,7 @@ void AssetCatalogTree::foreach_item(AssetCatalogTreeItem::ItemIterFn callback) c void AssetCatalogTree::foreach_root_item(const ItemIterFn callback) const { - for (auto &[key, item] : root_items_) { + for (const auto &[key, item] : root_items_) { callback(item); } } diff --git a/source/blender/asset_system/intern/asset_library.cc b/source/blender/asset_system/intern/asset_library.cc index b5c91ddbbe2..c21b4ac76fb 100644 --- a/source/blender/asset_system/intern/asset_library.cc +++ b/source/blender/asset_system/intern/asset_library.cc @@ -228,7 +228,7 @@ void AssetLibrary::remap_ids_and_remove_invalid(const bke::id::IDRemapper &mappi { Set removed_assets; - for (auto &asset_ptr : asset_storage_.local_id_assets) { + for (const auto &asset_ptr : asset_storage_.local_id_assets) { AssetRepresentation &asset = *asset_ptr; BLI_assert(asset.is_local_id()); diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc index 36449769b42..b4c879b0240 100644 --- a/source/blender/asset_system/intern/asset_library_service.cc +++ b/source/blender/asset_system/intern/asset_library_service.cc @@ -90,7 +90,7 @@ AssetLibrary *AssetLibraryService::get_asset_library( case ASSET_LIBRARY_ALL: return this->get_asset_library_all(bmain); case ASSET_LIBRARY_CUSTOM: { - bUserAssetLibrary *custom_library = this->find_custom_asset_library_from_library_ref( + bUserAssetLibrary *custom_library = find_custom_asset_library_from_library_ref( library_reference); if (!custom_library) { return nullptr; @@ -260,8 +260,8 @@ std::string AssetLibraryService::resolve_asset_weak_reference_to_library_path( switch (eAssetLibraryType(asset_reference.asset_library_type)) { case ASSET_LIBRARY_CUSTOM: { - bUserAssetLibrary *custom_lib = - this->find_custom_preferences_asset_library_from_asset_weak_ref(asset_reference); + bUserAssetLibrary *custom_lib = find_custom_preferences_asset_library_from_asset_weak_ref( + asset_reference); if (custom_lib) { library_dirpath = custom_lib->dirpath; break; diff --git a/source/blender/asset_system/tests/asset_representation_test.cc b/source/blender/asset_system/tests/asset_representation_test.cc index 106dd4a645b..75da7ce8858 100644 --- a/source/blender/asset_system/tests/asset_representation_test.cc +++ b/source/blender/asset_system/tests/asset_representation_test.cc @@ -2,17 +2,15 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "BLI_string.h" - #include "asset_library_service.hh" #include "asset_library_test_common.hh" #include "AS_asset_representation.hh" -#include "BKE_asset.hh" - #include "DNA_asset_types.h" +#include "BLI_string.h" + #include "../intern/utils.hh" #include "testing/testing.h" diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index a25e13878c3..8bcf309f03b 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -50,6 +50,7 @@ #include "rna_internal.hh" #include "WM_api.hh" +#include "WM_keymap.hh" #include "WM_types.hh" #include "BLT_lang.hh" diff --git a/source/blender/makesrna/intern/rna_wm.cc b/source/blender/makesrna/intern/rna_wm.cc index 7aa3e80931f..e3d123cfb3c 100644 --- a/source/blender/makesrna/intern/rna_wm.cc +++ b/source/blender/makesrna/intern/rna_wm.cc @@ -29,10 +29,13 @@ #include "rna_internal.hh" #include "WM_api.hh" +#include "WM_keymap.hh" #include "WM_types.hh" #ifdef RNA_RUNTIME +# include "BKE_wm_runtime.hh" + # include "wm_event_system.hh" static const EnumPropertyItem event_mouse_type_items[] = {