[Bf-blender-cvs] [cdcea4375c0] simulation-tree: implicitely convert rgba_f to const float *

Jacques Lucke noreply at git.blender.org
Tue Feb 25 18:01:54 CET 2020


Commit: cdcea4375c0e764ee7f8e8e21da054fff417a25f
Author: Jacques Lucke
Date:   Tue Feb 25 13:07:08 2020 +0100
Branches: simulation-tree
https://developer.blender.org/rBcdcea4375c0e764ee7f8e8e21da054fff417a25f

implicitely convert rgba_f to const float *

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

M	source/blender/blenlib/BLI_color.h

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

diff --git a/source/blender/blenlib/BLI_color.h b/source/blender/blenlib/BLI_color.h
index 46af5fad30d..09d562cae41 100644
--- a/source/blender/blenlib/BLI_color.h
+++ b/source/blender/blenlib/BLI_color.h
@@ -37,6 +37,11 @@ struct rgba_f {
     return &r;
   }
 
+  operator const float *() const
+  {
+    return &r;
+  }
+
   operator std::array<float, 4>()
   {
     return {r, g, b, a};



More information about the Bf-blender-cvs mailing list