diff --git a/source/blender/blenlib/intern/storage.cc b/source/blender/blenlib/intern/storage.cc index 09abbccf98c..6e832d613a1 100644 --- a/source/blender/blenlib/intern/storage.cc +++ b/source/blender/blenlib/intern/storage.cc @@ -459,14 +459,13 @@ bool BLI_is_file(const char *path) return (mode && !S_ISDIR(mode)); } -/** - * Use for both text and binary file reading. - */ void *BLI_file_read_data_as_mem_from_handle(FILE *fp, bool read_size_exact, size_t pad_bytes, size_t *r_size) { + /* NOTE: Used for both text and binary file reading. */ + BLI_stat_t st; if (BLI_fstat(fileno(fp), &st) == -1) { return nullptr; diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 458e562e807..23d72e347a1 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -988,14 +988,14 @@ void discard_edit_mode_pointers(ID *id_cow) } // namespace -/** - * Free content of the evaluated data-block. - * Notes: - * - Does not recurse into nested ID data-blocks. - * - Does not free data-block itself. - */ void deg_free_eval_copy_datablock(ID *id_cow) { + /* Free content of the evaluated data-block. + * Notes: + * - Does not recurse into nested ID data-blocks. + * - Does not free data-block itself. + */ + if (!check_datablock_expanded(id_cow)) { /* Actual content was never copied on top of evaluated data-block, we have * nothing to free. */