diff options
author | Julian Eisel <julian@blender.org> | 2021-07-02 16:30:00 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-07-02 16:42:22 +0300 |
commit | 88c855174d4516df3afb524064ac1fd3bedc6780 (patch) | |
tree | f28978fcf398f1fed704c2185dcadae21a3169d7 /source/blender/editors/space_file/filelist.c | |
parent | 5a693ce9e396f04d88140d8e015fcace7eddc6c2 (diff) |
Cleanup: Remove unused/unneeded code from old Asset Engine design
This code was written for the File Browser together with the Asset Engine
design, that is not part of the Asset Browser/System design anymore. Updated
comments accordingly.
`FileDirEntryRevision` was actually used, but I removed it and moved the used
members to the parent `FileDirEntry`, since there is no concept of revisions
currently.
There should be no functional changes.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index a847d60ba52..b81605d6379 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1382,40 +1382,6 @@ static void filelist_entry_clear(FileDirEntry *entry) BKE_icon_delete(entry->preview_icon_id); entry->preview_icon_id = 0; } - /* For now, consider FileDirEntryRevision::poin as not owned here, - * so no need to do anything about it */ - - if (!BLI_listbase_is_empty(&entry->variants)) { - FileDirEntryVariant *var; - - for (var = entry->variants.first; var; var = var->next) { - if (var->name) { - MEM_freeN(var->name); - } - if (var->description) { - MEM_freeN(var->description); - } - - if (!BLI_listbase_is_empty(&var->revisions)) { - FileDirEntryRevision *rev; - - for (rev = var->revisions.first; rev; rev = rev->next) { - if (rev->comment) { - MEM_freeN(rev->comment); - } - } - - BLI_freelistN(&var->revisions); - } - } - - /* TODO: tags! */ - - BLI_freelistN(&entry->variants); - } - else if (entry->entry) { - MEM_freeN(entry->entry); - } } static void filelist_entry_free(FileDirEntry *entry) @@ -1954,16 +1920,12 @@ static FileDirEntry *filelist_file_create_entry(FileList *filelist, const int in FileListInternEntry *entry = filelist->filelist_intern.filtered[index]; FileListEntryCache *cache = &filelist->filelist_cache; FileDirEntry *ret; - FileDirEntryRevision *rev; ret = MEM_callocN(sizeof(*ret), __func__); - rev = MEM_callocN(sizeof(*rev), __func__); - - rev->size = (uint64_t)entry->st.st_size; - rev->time = (int64_t)entry->st.st_mtime; + ret->size = (uint64_t)entry->st.st_size; + ret->time = (int64_t)entry->st.st_mtime; - ret->entry = rev; ret->relpath = BLI_strdup(entry->relpath); if (entry->free_name) { ret->name = BLI_strdup(entry->name); |