Make Mat2D constructors constexpr Diffs= 33aec1b20 Make Mat2D constructors constexpr (#5932) Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head index 902ce9d..6b700cd 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -4335a2cd2f18b8f8cb30555ff5a6fa24a1d54143 +33aec1b20028fed8d1cf790378db26241212784f
diff --git a/include/rive/math/mat2d.hpp b/include/rive/math/mat2d.hpp index 08360ed..6c347c6 100644 --- a/include/rive/math/mat2d.hpp +++ b/include/rive/math/mat2d.hpp
@@ -11,8 +11,8 @@ class Mat2D { public: - Mat2D() : m_buffer{{1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f}} {} - Mat2D(float x1, float y1, float x2, float y2, float tx, float ty) : + constexpr Mat2D() : m_buffer{{1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f}} {} + constexpr Mat2D(float x1, float y1, float x2, float y2, float tx, float ty) : m_buffer{{x1, y1, x2, y2, tx, ty}} {}
diff --git a/src/shapes/path_composer.cpp b/src/shapes/path_composer.cpp index 096848c..34faf3d 100644 --- a/src/shapes/path_composer.cpp +++ b/src/shapes/path_composer.cpp
@@ -6,8 +6,6 @@ using namespace rive; -static Mat2D identity; - PathComposer::PathComposer(Shape* shape) : m_Shape(shape), m_deferredPathDirt(false) {} void PathComposer::buildDependencies()