[Bf-blender-cvs] [7150f919d3c] master: Cleanup: Remove unused headers in asset files

Julian Eisel noreply at git.blender.org
Mon Nov 1 13:23:09 CET 2021


Commit: 7150f919d3ca6638b6c0e0f2389b88f15db5f171
Author: Julian Eisel
Date:   Mon Nov 1 13:21:07 2021 +0100
Branches: master
https://developer.blender.org/rB7150f919d3ca6638b6c0e0f2389b88f15db5f171

Cleanup: Remove unused headers in asset files

Also move system includes first, like we have it elsewhere in Blender.

===================================================================

M	source/blender/blenkernel/intern/asset.cc
M	source/blender/blenkernel/intern/asset_catalog.cc
M	source/blender/blenkernel/intern/asset_library.cc
M	source/blender/blenkernel/intern/asset_library_service.cc
M	source/blender/editors/asset/intern/asset_catalog.cc
M	source/blender/editors/asset/intern/asset_filter.cc
M	source/blender/editors/asset/intern/asset_handle.cc
M	source/blender/editors/asset/intern/asset_library_reference_enum.cc
M	source/blender/editors/asset/intern/asset_list.cc
M	source/blender/editors/asset/intern/asset_mark_clear.cc
M	source/blender/editors/asset/intern/asset_ops.cc
M	source/blender/editors/asset/intern/asset_temp_id_consumer.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/asset.cc b/source/blender/blenkernel/intern/asset.cc
index 7bea089b9bf..59e402b6680 100644
--- a/source/blender/blenkernel/intern/asset.cc
+++ b/source/blender/blenkernel/intern/asset.cc
@@ -21,14 +21,12 @@
 #include <cstring>
 
 #include "DNA_ID.h"
-#include "DNA_asset_types.h"
 #include "DNA_defaults.h"
 
 #include "BLI_listbase.h"
 #include "BLI_string.h"
 #include "BLI_string_ref.hh"
 #include "BLI_string_utils.h"
-#include "BLI_utildefines.h"
 #include "BLI_uuid.h"
 
 #include "BKE_asset.h"
diff --git a/source/blender/blenkernel/intern/asset_catalog.cc b/source/blender/blenkernel/intern/asset_catalog.cc
index 13f66445c46..03043f3b784 100644
--- a/source/blender/blenkernel/intern/asset_catalog.cc
+++ b/source/blender/blenkernel/intern/asset_catalog.cc
@@ -18,25 +18,20 @@
  * \ingroup bke
  */
 
+#include <fstream>
+#include <set>
+
 #include "BKE_asset_catalog.hh"
 #include "BKE_asset_library.h"
-#include "BKE_preferences.h"
 
 #include "BLI_fileops.h"
 #include "BLI_path_util.h"
-#include "BLI_set.hh"
-#include "BLI_string_ref.hh"
-
-#include "DNA_userdef_types.h"
 
 /* For S_ISREG() and S_ISDIR() on Windows. */
 #ifdef WIN32
 #  include "BLI_winstuff.h"
 #endif
 
-#include <fstream>
-#include <set>
-
 namespace blender::bke {
 
 const CatalogFilePath AssetCatalogService::DEFAULT_CATALOG_FILENAME = "blender_assets.cats.txt";
diff --git a/source/blender/blenkernel/intern/asset_library.cc b/source/blender/blenkernel/intern/asset_library.cc
index aae8a289d32..68e43852a21 100644
--- a/source/blender/blenkernel/intern/asset_library.cc
+++ b/source/blender/blenkernel/intern/asset_library.cc
@@ -18,9 +18,9 @@
  * \ingroup bke
  */
 
-#include "BKE_asset_catalog.hh"
+#include <memory>
+
 #include "BKE_asset_library.hh"
-#include "BKE_callbacks.h"
 #include "BKE_main.h"
 #include "BKE_preferences.h"
 
@@ -29,12 +29,8 @@
 #include "DNA_asset_types.h"
 #include "DNA_userdef_types.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "asset_library_service.hh"
 
-#include <memory>
-
 bool blender::bke::AssetLibrary::save_catalogs_when_file_is_saved = true;
 
 /**
diff --git a/source/blender/blenkernel/intern/asset_library_service.cc b/source/blender/blenkernel/intern/asset_library_service.cc
index 7cf95ee4cc1..4619ecb2e42 100644
--- a/source/blender/blenkernel/intern/asset_library_service.cc
+++ b/source/blender/blenkernel/intern/asset_library_service.cc
@@ -20,16 +20,11 @@
 
 #include "asset_library_service.hh"
 
-#include "BKE_asset_library.hh"
 #include "BKE_blender.h"
-#include "BKE_callbacks.h"
 
-#include "BLI_fileops.h"
 #include "BLI_path_util.h"
 #include "BLI_string_ref.hh"
 
-#include "MEM_guardedalloc.h"
-
 #include "CLG_log.h"
 
 static CLG_LogRef LOG = {"bke.asset_service"};
diff --git a/source/blender/editors/asset/intern/asset_catalog.cc b/source/blender/editors/asset/intern/asset_catalog.cc
index 8e1e5be2e47..9634665be7b 100644
--- a/source/blender/editors/asset/intern/asset_catalog.cc
+++ b/source/blender/editors/asset/intern/asset_catalog.cc
@@ -19,7 +19,6 @@
  */
 
 #include "BKE_asset_catalog.hh"
-#include "BKE_asset_catalog_path.hh"
 #include "BKE_asset_library.hh"
 #include "BKE_main.h"
 
diff --git a/source/blender/editors/asset/intern/asset_filter.cc b/source/blender/editors/asset/intern/asset_filter.cc
index 329342a30cd..c22bbc923eb 100644
--- a/source/blender/editors/asset/intern/asset_filter.cc
+++ b/source/blender/editors/asset/intern/asset_filter.cc
@@ -22,7 +22,6 @@
 
 #include "BLI_listbase.h"
 
-#include "DNA_ID.h"
 #include "DNA_asset_types.h"
 
 #include "ED_asset_filter.h"
diff --git a/source/blender/editors/asset/intern/asset_handle.cc b/source/blender/editors/asset/intern/asset_handle.cc
index 5c8d0b1349c..363bd9226da 100644
--- a/source/blender/editors/asset/intern/asset_handle.cc
+++ b/source/blender/editors/asset/intern/asset_handle.cc
@@ -26,7 +26,6 @@
 
 #include <string>
 
-#include "DNA_asset_types.h"
 #include "DNA_space_types.h"
 
 #include "BLO_readfile.h"
diff --git a/source/blender/editors/asset/intern/asset_library_reference_enum.cc b/source/blender/editors/asset/intern/asset_library_reference_enum.cc
index c57d121a18f..1a2d3f5837a 100644
--- a/source/blender/editors/asset/intern/asset_library_reference_enum.cc
+++ b/source/blender/editors/asset/intern/asset_library_reference_enum.cc
@@ -27,7 +27,6 @@
 
 #include "BKE_preferences.h"
 
-#include "DNA_asset_types.h"
 #include "DNA_userdef_types.h"
 
 #include "UI_resources.h"
diff --git a/source/blender/editors/asset/intern/asset_list.cc b/source/blender/editors/asset/intern/asset_list.cc
index 4bc15e842fc..b5ea054fb5d 100644
--- a/source/blender/editors/asset/intern/asset_list.cc
+++ b/source/blender/editors/asset/intern/asset_list.cc
@@ -32,7 +32,6 @@
 #include "BLI_path_util.h"
 #include "BLI_utility_mixins.hh"
 
-#include "DNA_asset_types.h"
 #include "DNA_space_types.h"
 
 #include "BKE_preferences.h"
@@ -40,7 +39,6 @@
 #include "ED_fileselect.h"
 
 #include "WM_api.h"
-#include "WM_types.h"
 
 /* XXX uses private header of file-space. */
 #include "../space_file/filelist.h"
diff --git a/source/blender/editors/asset/intern/asset_mark_clear.cc b/source/blender/editors/asset/intern/asset_mark_clear.cc
index a0a2c63b407..2e5bdb63359 100644
--- a/source/blender/editors/asset/intern/asset_mark_clear.cc
+++ b/source/blender/editors/asset/intern/asset_mark_clear.cc
@@ -20,9 +20,6 @@
  * Functions for marking and clearing assets.
  */
 
-#include <memory>
-#include <string>
-
 #include "DNA_ID.h"
 
 #include "BKE_asset.h"
@@ -32,8 +29,6 @@
 #include "BKE_lib_id.h"
 #include "BKE_main.h"
 
-#include "BLO_readfile.h"
-
 #include "UI_interface_icons.h"
 
 #include "RNA_access.h"
diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc
index d2fd8ab88a4..f7c567c89f6 100644
--- a/source/blender/editors/asset/intern/asset_ops.cc
+++ b/source/blender/editors/asset/intern/asset_ops.cc
@@ -18,19 +18,13 @@
  * \ingroup edasset
  */
 
-#include "BKE_asset.h"
-#include "BKE_asset_catalog.hh"
 #include "BKE_asset_library.hh"
 #include "BKE_context.h"
 #include "BKE_lib_id.h"
 #include "BKE_main.h"
 #include "BKE_report.h"
 
-#include "BLI_string_ref.hh"
-#include "BLI_vector.hh"
-
 #include "ED_asset.h"
-#include "ED_asset_catalog.hh"
 /* XXX needs access to the file list, should all be done via the asset system in future. */
 #include "ED_fileselect.h"
 
@@ -38,7 +32,6 @@
 #include "RNA_define.h"
 
 #include "WM_api.h"
-#include "WM_types.h"
 
 using namespace blender;
 
diff --git a/source/blender/editors/asset/intern/asset_temp_id_consumer.cc b/source/blender/editors/asset/intern/asset_temp_id_consumer.cc
index f664eab5cbb..f136c08f129 100644
--- a/source/blender/editors/asset/intern/asset_temp_id_consumer.cc
+++ b/source/blender/editors/asset/intern/asset_temp_id_consumer.cc
@@ -23,7 +23,6 @@
 
 #include <new>
 
-#include "DNA_asset_types.h"
 #include "DNA_space_types.h"
 
 #include "BKE_report.h"



More information about the Bf-blender-cvs mailing list