WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 352 commits from brush-assets-project into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 2 additions and 6 deletions
Showing only changes of commit 602d593b30 - Show all commits

View File

@ -58,9 +58,7 @@ void BLO_memfile_merge(MemFile *first, MemFile *second)
BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__);
/* First, detect all memchunks in second memfile that are not owned by it. */
for (MemFileChunk *sc = static_cast<MemFileChunk *>(second->chunks.first); sc != nullptr;
sc = static_cast<MemFileChunk *>(sc->next))
{
LISTBASE_FOREACH (MemFileChunk *, sc, &second->chunks) {
if (sc->is_identical) {
BLI_ghash_insert(buffer_to_second_memchunk, (void *)sc->buf, sc);
}
@ -68,9 +66,7 @@ void BLO_memfile_merge(MemFile *first, MemFile *second)
/* Now, check all chunks from first memfile (the one we are removing), and if a memchunk owned by
* it is also used by the second memfile, transfer the ownership. */
for (MemFileChunk *fc = static_cast<MemFileChunk *>(first->chunks.first); fc != nullptr;
fc = static_cast<MemFileChunk *>(fc->next))
{
LISTBASE_FOREACH (MemFileChunk *, fc, &first->chunks) {
if (!fc->is_identical) {
MemFileChunk *sc = static_cast<MemFileChunk *>(
BLI_ghash_lookup(buffer_to_second_memchunk, fc->buf));