From 0b3313e53230914e79dd5c8f02b90fbaf6a8874b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 30 Jun 2020 10:52:02 +0200 Subject: Cleanup: LibOverride: Replace raw pointers checks by proper macros. This is cleaner, but also crucial to avoid weird issues when behaviors of those checks are modified... --- source/blender/editors/interface/interface_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/interface/interface_ops.c') diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index d7f7f02c535..cb8f8be6361 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -613,7 +613,7 @@ static bool override_remove_button_poll(bContext *C) UI_context_active_but_prop_get(C, &ptr, &prop, &index); - const int override_status = RNA_property_override_library_status(&ptr, prop, index); + const uint override_status = RNA_property_override_library_status(&ptr, prop, index); return (ptr.data && ptr.owner_id && prop && (override_status & RNA_OVERRIDE_STATUS_OVERRIDDEN)); } @@ -634,7 +634,7 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) BLI_assert(oprop != NULL); BLI_assert(id != NULL && id->override_library != NULL); - const bool is_template = (id->override_library->reference == NULL); + const bool is_template = ID_IS_OVERRIDE_LIBRARY_TEMPLATE(id); /* We need source (i.e. linked data) to restore values of deleted overrides... * If this is an override template, we obviously do not need to restore anything. */ -- cgit v1.2.3