Cleanup: Remove unnecessary keywords from C++ headers

This commit is contained in:
Hans Goudey
2024-01-26 15:25:47 -05:00
parent 0e6aad4742
commit 1743af0031
9 changed files with 52 additions and 61 deletions

View File

@@ -26,8 +26,7 @@
struct AssetLibrary;
struct bScreen;
void ED_asset_catalogs_save_from_main_path(struct ::AssetLibrary *library,
const struct Main *bmain);
void ED_asset_catalogs_save_from_main_path(::AssetLibrary *library, const Main *bmain);
/**
* Saving catalog edits when the file is saved is a global option shared for each asset library,

View File

@@ -19,13 +19,12 @@
#include "RNA_types.hh"
struct AssetHandle;
namespace blender::asset_system {
class AssetRepresentation;
}
struct AssetHandle;
blender::asset_system::AssetRepresentation *ED_asset_handle_get_representation(
const struct AssetHandle *asset);
int ED_asset_handle_get_preview_icon_id(const struct AssetHandle *asset);
int ED_asset_handle_get_preview_or_type_icon_id(const struct AssetHandle *asset);
const AssetHandle *asset);
int ED_asset_handle_get_preview_icon_id(const AssetHandle *asset);
int ED_asset_handle_get_preview_or_type_icon_id(const AssetHandle *asset);

View File

@@ -32,5 +32,4 @@ AssetLibraryReference ED_asset_library_reference_from_enum_value(int value);
* included, since they are stored on disk with a single root directory,
* thus have a well defined location that can be written to.
*/
const struct EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf(
bool include_generated);
const EnumPropertyItem *ED_asset_library_reference_to_rna_enum_itemf(bool include_generated);

View File

@@ -16,6 +16,7 @@ struct AssetHandle;
struct AssetLibraryReference;
struct AssetLibraryReference;
struct ID;
struct ImBuf;
struct bContext;
struct wmNotifier;
struct wmRegionListenerParams;
@@ -61,12 +62,11 @@ void ED_assetlist_iterate(const AssetLibraryReference &library_reference, AssetL
* \warning: Asset list reading involves an #AS_asset_library_load() call which may reload asset
* library data like catalogs (invalidating pointers). Refer to its warning for details.
*/
void ED_assetlist_storage_fetch(const struct AssetLibraryReference *library_reference,
const struct bContext *C);
bool ED_assetlist_is_loaded(const struct AssetLibraryReference *library_reference);
void ED_assetlist_ensure_previews_job(const struct AssetLibraryReference *library_reference,
const struct bContext *C);
void ED_assetlist_clear(const struct AssetLibraryReference *library_reference, struct bContext *C);
void ED_assetlist_storage_fetch(const AssetLibraryReference *library_reference, const bContext *C);
bool ED_assetlist_is_loaded(const AssetLibraryReference *library_reference);
void ED_assetlist_ensure_previews_job(const AssetLibraryReference *library_reference,
const bContext *C);
void ED_assetlist_clear(const AssetLibraryReference *library_reference, bContext *C);
bool ED_assetlist_storage_has_list_for_library(const AssetLibraryReference *library_reference);
/**
* Tag all asset lists in the storage that show main data as needing an update (re-fetch).
@@ -75,17 +75,17 @@ bool ED_assetlist_storage_has_list_for_library(const AssetLibraryReference *libr
* for ensuring the necessary redraw. It can use #ED_assetlist_listen() to check if the asset-list
* needs a redraw for a given notifier.
*/
void ED_assetlist_storage_tag_main_data_dirty(void);
void ED_assetlist_storage_tag_main_data_dirty();
/**
* Remapping of ID pointers within the asset lists. Typically called when an ID is deleted to clear
* all references to it (\a id_new is null then).
*/
void ED_assetlist_storage_id_remap(struct ID *id_old, struct ID *id_new);
void ED_assetlist_storage_id_remap(ID *id_old, ID *id_new);
/**
* Can't wait for static deallocation to run. There's nested data allocated with our guarded
* allocator, it will complain about unfreed memory on exit.
*/
void ED_assetlist_storage_exit(void);
void ED_assetlist_storage_exit();
AssetHandle ED_assetlist_asset_handle_get_by_index(const AssetLibraryReference *library_reference,
int asset_index);
@@ -94,14 +94,14 @@ blender::asset_system::AssetRepresentation *ED_assetlist_asset_get_by_index(
bool ED_assetlist_asset_image_is_loading(const AssetLibraryReference *library_reference,
const AssetHandle *asset_handle);
struct ImBuf *ED_assetlist_asset_image_get(const AssetHandle *asset_handle);
ImBuf *ED_assetlist_asset_image_get(const AssetHandle *asset_handle);
/**
* \return True if the region needs a UI redraw.
*/
bool ED_assetlist_listen(const struct wmNotifier *notifier);
bool ED_assetlist_listen(const wmNotifier *notifier);
/**
* \return The number of assets stored in the asset list for \a library_reference, or -1 if there
* is no list fetched for it.
*/
int ED_assetlist_size(const struct AssetLibraryReference *library_reference);
int ED_assetlist_size(const AssetLibraryReference *library_reference);

View File

@@ -20,14 +20,14 @@ struct bContext;
*
* \return whether the datablock was marked as asset; false when it is not capable of becoming an
* asset, or when it already was an asset. */
bool ED_asset_mark_id(struct ID *id);
bool ED_asset_mark_id(ID *id);
/**
* Generate preview image for the given datablock.
*
* The preview image might be generated using a background thread.
*/
void ED_asset_generate_preview(const struct bContext *C, struct ID *id);
void ED_asset_generate_preview(const bContext *C, ID *id);
/**
* Remove the asset metadata, turning the ID into a "normal" ID.
@@ -37,7 +37,7 @@ void ED_asset_generate_preview(const struct bContext *C, struct ID *id);
*
* \return whether the asset metadata was actually removed; false when the ID was not an asset.
*/
bool ED_asset_clear_id(struct ID *id);
bool ED_asset_clear_id(ID *id);
/**
* Copy the asset metadata to the given destination ID.
@@ -49,8 +49,8 @@ bool ED_asset_clear_id(struct ID *id);
* \return true when the copy succeeded, false otherwise. The only reason for
* failure is when \a destination is of a type that cannot be an asset.
*/
bool ED_asset_copy_to_id(const struct AssetMetaData *asset_data, struct ID *destination);
bool ED_asset_copy_to_id(const AssetMetaData *asset_data, ID *destination);
void ED_assets_pre_save(struct Main *bmain);
void ED_assets_pre_save(Main *bmain);
bool ED_asset_can_mark_single_from_context(const struct bContext *C);
bool ED_asset_can_mark_single_from_context(const bContext *C);

View File

@@ -32,37 +32,34 @@ struct RegionPollParams;
*
* \{ */
bool ED_asset_shelf_regions_poll(const struct RegionPollParams *params);
bool ED_asset_shelf_regions_poll(const RegionPollParams *params);
/** Only needed for #RGN_TYPE_ASSET_SHELF (not #RGN_TYPE_ASSET_SHELF_HEADER). */
void *ED_asset_shelf_region_duplicate(void *regiondata);
void ED_asset_shelf_region_free(struct ARegion *region);
void ED_asset_shelf_region_init(struct wmWindowManager *wm, struct ARegion *region);
int ED_asset_shelf_region_snap(const struct ARegion *region, int size, int axis);
void ED_asset_shelf_region_on_user_resize(const struct ARegion *region);
void ED_asset_shelf_region_listen(const struct wmRegionListenerParams *params);
void ED_asset_shelf_region_layout(const bContext *C, struct ARegion *region);
void ED_asset_shelf_region_draw(const bContext *C, struct ARegion *region);
void ED_asset_shelf_region_blend_read_data(BlendDataReader *reader, struct ARegion *region);
void ED_asset_shelf_region_blend_write(BlendWriter *writer, struct ARegion *region);
void ED_asset_shelf_region_free(ARegion *region);
void ED_asset_shelf_region_init(wmWindowManager *wm, ARegion *region);
int ED_asset_shelf_region_snap(const ARegion *region, int size, int axis);
void ED_asset_shelf_region_on_user_resize(const ARegion *region);
void ED_asset_shelf_region_listen(const wmRegionListenerParams *params);
void ED_asset_shelf_region_layout(const bContext *C, ARegion *region);
void ED_asset_shelf_region_draw(const bContext *C, ARegion *region);
void ED_asset_shelf_region_blend_read_data(BlendDataReader *reader, ARegion *region);
void ED_asset_shelf_region_blend_write(BlendWriter *writer, ARegion *region);
int ED_asset_shelf_region_prefsizey(void);
void ED_asset_shelf_header_region_init(struct wmWindowManager *wm, struct ARegion *region);
void ED_asset_shelf_header_region(const struct bContext *C, struct ARegion *region);
void ED_asset_shelf_header_region_listen(const struct wmRegionListenerParams *params);
void ED_asset_shelf_header_region_init(wmWindowManager *wm, ARegion *region);
void ED_asset_shelf_header_region(const bContext *C, ARegion *region);
void ED_asset_shelf_header_region_listen(const wmRegionListenerParams *params);
int ED_asset_shelf_header_region_size(void);
void ED_asset_shelf_header_regiontype_register(struct ARegionType *region_type,
const int space_type);
void ED_asset_shelf_header_regiontype_register(ARegionType *region_type, const int space_type);
/** \} */
/* -------------------------------------------------------------------- */
void ED_asset_shelf_type_unlink(const struct Main &bmain, const struct AssetShelfType &shelf_type);
void ED_asset_shelf_type_unlink(const Main &bmain, const AssetShelfType &shelf_type);
int ED_asset_shelf_tile_width(const struct AssetShelfSettings &settings);
int ED_asset_shelf_tile_height(const struct AssetShelfSettings &settings);
int ED_asset_shelf_tile_width(const AssetShelfSettings &settings);
int ED_asset_shelf_tile_height(const AssetShelfSettings &settings);
int ED_asset_shelf_context(const struct bContext *C,
const char *member,
struct bContextDataResult *result);
int ED_asset_shelf_context(const bContext *C, const char *member, bContextDataResult *result);

View File

@@ -15,20 +15,19 @@
#include "DNA_ID_enums.h"
struct AssetTempIDConsumer;
struct ID;
struct Main;
struct ReportList;
namespace blender::asset_system {
class AssetRepresentation;
}
typedef struct AssetTempIDConsumer AssetTempIDConsumer;
struct Main;
struct ReportList;
AssetTempIDConsumer *ED_asset_temp_id_consumer_create(
const blender::asset_system::AssetRepresentation *asset);
void ED_asset_temp_id_consumer_free(AssetTempIDConsumer **consumer);
struct ID *ED_asset_temp_id_consumer_ensure_local_id(AssetTempIDConsumer *consumer,
ID_Type id_type,
struct Main *bmain,
struct ReportList *reports);
ID *ED_asset_temp_id_consumer_ensure_local_id(AssetTempIDConsumer *consumer,
ID_Type id_type,
Main *bmain,
ReportList *reports);

View File

@@ -12,7 +12,7 @@
struct ID;
bool ED_asset_type_id_is_non_experimental(const struct ID *id);
bool ED_asset_type_id_is_non_experimental(const ID *id);
#define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS \
(FILTER_ID_MA | FILTER_ID_GR | FILTER_ID_OB | FILTER_ID_AC | FILTER_ID_WO | FILTER_ID_NT)
@@ -28,7 +28,7 @@ bool ED_asset_type_is_supported(const ID *id);
* \note Does not check for #BKE_id_can_be_asset(), so may return filter flags for IDs that can
* never be assets.
*/
int64_t ED_asset_types_supported_as_filter_flags(void);
int64_t ED_asset_types_supported_as_filter_flags();
/**
* Utility: A string enumerating the non-experimental asset types. This is useful info to

View File

@@ -942,6 +942,4 @@ constexpr FileIndexerType asset_indexer()
} // namespace blender::ed::asset::index
extern "C" {
const FileIndexerType file_indexer_asset = blender::ed::asset::index::asset_indexer();
}