[Bf-blender-cvs] [6a2c42a0d58] master: Cleanup: remove redundant RNA_struct_property_is_set check

Campbell Barton noreply at git.blender.org
Mon Jun 27 13:35:41 CEST 2022


Commit: 6a2c42a0d58e0f36cca1cf4ca0c5c98ec3612f6f
Author: Campbell Barton
Date:   Mon Jun 27 21:32:13 2022 +1000
Branches: master
https://developer.blender.org/rB6a2c42a0d58e0f36cca1cf4ca0c5c98ec3612f6f

Cleanup: remove redundant RNA_struct_property_is_set check

This dates back to [0] from before PROP_SKIP_SAVE existed.
While harmless it's confusing why only one option uses this check.

[0]: ff83a98a07c3d55eac03ebd903ad7a0c3e6c33b4

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

M	source/blender/windowmanager/intern/wm_files.c

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

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index a170fa9902b..5f4c39e33f7 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -3063,8 +3063,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
   Main *bmain = CTX_data_main(C);
   char path[FILE_MAX];
   const bool is_save_as = (op->type->invoke == wm_save_as_mainfile_invoke);
-  const bool use_save_as_copy = (RNA_struct_property_is_set(op->ptr, "copy") &&
-                                 RNA_boolean_get(op->ptr, "copy"));
+  const bool use_save_as_copy = RNA_boolean_get(op->ptr, "copy");
 
   /* We could expose all options to the users however in most cases remapping
    * existing relative paths is a good default.



More information about the Bf-blender-cvs mailing list