Cleanup: Correct usage of std::unique_ptr in Line Art code

`.release()` is technically fine but semantically wrong here. First,
release is meant to take ownership from the unique_ptr, meaning
at best it's "weird" to not do anything with the pointer afterwards.
Second, the runtime struct with the unique_ptr was just default
constructed, which means the unique_ptr will be empty anyway.
This commit is contained in:
Hans Goudey
2024-12-09 14:26:08 -05:00
committed by Hans Goudey
parent 7c97088fb2
commit 7baa22b49d

View File

@@ -100,11 +100,8 @@ static void copy_data(const ModifierData *md, ModifierData *target, const int fl
blender::Set<const Object *> *object_dependencies = source_runtime->object_dependencies.get();
if (object_dependencies) {
target_runtime->object_dependencies.reset(
new blender::Set<const Object *>(*object_dependencies));
}
else {
target_runtime->object_dependencies.release();
target_runtime->object_dependencies = std::make_unique<blender::Set<const Object *>>(
object_dependencies);
}
}