Cleanup: Pass const context to asset function

This commit is contained in:
Hans Goudey
2024-01-31 21:18:09 -05:00
parent fac27b1b6b
commit ed500d93b4
2 changed files with 4 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ void iterate(const AssetLibraryReference &library_reference, AssetListIterFn fn)
void storage_fetch(const AssetLibraryReference *library_reference, const bContext *C);
bool is_loaded(const AssetLibraryReference *library_reference);
void ensure_previews_job(const AssetLibraryReference *library_reference, const bContext *C);
void clear(const AssetLibraryReference *library_reference, bContext *C);
void clear(const AssetLibraryReference *library_reference, const bContext *C);
bool 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).

View File

@@ -116,7 +116,7 @@ class AssetList : NonCopyable {
void setup();
void fetch(const bContext &C);
void ensurePreviewsJob(const bContext *C);
void clear(bContext *C);
void clear(const bContext *C);
AssetHandle asset_get_by_index(int index) const;
@@ -257,7 +257,7 @@ void AssetList::ensurePreviewsJob(const bContext *C)
}
}
void AssetList::clear(bContext *C)
void AssetList::clear(const bContext *C)
{
/* Based on #ED_fileselect_clear() */
@@ -477,7 +477,7 @@ void ensure_previews_job(const AssetLibraryReference *library_reference, const b
}
}
void clear(const AssetLibraryReference *library_reference, bContext *C)
void clear(const AssetLibraryReference *library_reference, const bContext *C)
{
AssetList *list = AssetListStorage::lookup_list(*library_reference);
if (list) {