[Bf-blender-cvs] [7ec2c5c10bc] master: Cleanup: Remove confusing double negation in RNA helper function

Julian Eisel noreply at git.blender.org
Tue Mar 15 13:12:11 CET 2022


Commit: 7ec2c5c10bc214707d437200481a90336831e902
Author: Julian Eisel
Date:   Tue Mar 15 13:09:41 2022 +0100
Branches: master
https://developer.blender.org/rB7ec2c5c10bc214707d437200481a90336831e902

Cleanup: Remove confusing double negation in RNA helper function

Much more readable that way.

===================================================================

M	source/blender/makesrna/intern/rna_access.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 943b2fccbb7..b4617321f44 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -160,7 +160,7 @@ void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
 
 bool RNA_pointer_is_null(const PointerRNA *ptr)
 {
-  return !((ptr->data != NULL) && (ptr->owner_id != NULL) && (ptr->type != NULL));
+  return (ptr->data == NULL) || (ptr->owner_id == NULL) || (ptr->type == NULL);
 }
 
 static void rna_pointer_inherit_id(StructRNA *type, PointerRNA *parent, PointerRNA *ptr)



More information about the Bf-blender-cvs mailing list