[Bf-blender-cvs] [d3ea9316475] master: Fix: Compile error from designated initializers in C++

Hans Goudey noreply at git.blender.org
Thu Jan 19 20:38:02 CET 2023


Commit: d3ea9316475a605f250d28482a132fce40ce46d4
Author: Hans Goudey
Date:   Thu Jan 19 13:35:37 2023 -0600
Branches: master
https://developer.blender.org/rBd3ea9316475a605f250d28482a132fce40ce46d4

Fix: Compile error from designated initializers in C++

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

M	source/blender/blenkernel/intern/nla_test.cc

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

diff --git a/source/blender/blenkernel/intern/nla_test.cc b/source/blender/blenkernel/intern/nla_test.cc
index e6875fff1ce..2f670ef69e5 100644
--- a/source/blender/blenkernel/intern/nla_test.cc
+++ b/source/blender/blenkernel/intern/nla_test.cc
@@ -3,43 +3,40 @@
 
 #include "BKE_nla.h"
 
-#include "DNA_nla_types.h"
 #include "DNA_anim_types.h"
+#include "DNA_nla_types.h"
 
 #include "MEM_guardedalloc.h"
 
 #include "testing/testing.h"
 
-
 namespace blender::bke::tests {
 
 TEST(nla_strip, BKE_nlastrip_recalculate_blend)
 {
-
-  NlaStrip strip = {
-    .blendin = 4.0,
-    .blendout = 5.0,
-    .start = 1,
-    .end = 10
-  };
+  NlaStrip strip{};
+  strip.blendin = 4.0;
+  strip.blendout = 5.0;
+  strip.start = 1;
+  strip.end = 10;
 
   /* Scaling a strip up doesn't affect the blend in/out value */
-    strip.end = 20;
-    BKE_nlastrip_recalculate_blend(&strip);
-    EXPECT_FLOAT_EQ(strip.blendin, 4.0);
-    EXPECT_FLOAT_EQ(strip.blendout, 5.0);
+  strip.end = 20;
+  BKE_nlastrip_recalculate_blend(&strip);
+  EXPECT_FLOAT_EQ(strip.blendin, 4.0);
+  EXPECT_FLOAT_EQ(strip.blendout, 5.0);
 
   /* Scaling a strip down affects the blend-in value before the blend-out value  */
-    strip.end = 7;
-    BKE_nlastrip_recalculate_blend(&strip);
-    EXPECT_FLOAT_EQ(strip.blendin, 1.0);
-    EXPECT_FLOAT_EQ(strip.blendout, 5.0);
-
-    /* Scaling a strip down to nothing updates the blend in/out values accordingly  */
-    strip.end = 1.1;
-    BKE_nlastrip_recalculate_blend(&strip);
-    EXPECT_FLOAT_EQ(strip.blendin, 0.0);
-    EXPECT_FLOAT_EQ(strip.blendout, 0.1);
+  strip.end = 7;
+  BKE_nlastrip_recalculate_blend(&strip);
+  EXPECT_FLOAT_EQ(strip.blendin, 1.0);
+  EXPECT_FLOAT_EQ(strip.blendout, 5.0);
+
+  /* Scaling a strip down to nothing updates the blend in/out values accordingly  */
+  strip.end = 1.1;
+  BKE_nlastrip_recalculate_blend(&strip);
+  EXPECT_FLOAT_EQ(strip.blendin, 0.0);
+  EXPECT_FLOAT_EQ(strip.blendout, 0.1);
 }
 
 }  // namespace blender::bke::tests



More information about the Bf-blender-cvs mailing list