From e3aede39d84b1f23ec3527e63fd544dc27476216 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Tue, 2 Jan 2018 10:09:15 +0000 Subject: [PATCH] DSP: Fixed an overly restrictive assertion in the Matrix multiplication operator --- modules/juce_dsp/maths/juce_Matrix.cpp | 2 +- modules/juce_dsp/maths/juce_Matrix.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_dsp/maths/juce_Matrix.cpp b/modules/juce_dsp/maths/juce_Matrix.cpp index d91859ad09..4e48013112 100644 --- a/modules/juce_dsp/maths/juce_Matrix.cpp +++ b/modules/juce_dsp/maths/juce_Matrix.cpp @@ -116,7 +116,7 @@ Matrix Matrix::operator* (const Matrix& o auto n = getNumRows(), m = other.getNumColumns(), p = getNumColumns(); Matrix result (n, m); - jassert (other.getNumRows() == p && n == m); + jassert (p == other.getNumRows()); size_t offsetMat = 0, offsetlhs = 0; diff --git a/modules/juce_dsp/maths/juce_Matrix.h b/modules/juce_dsp/maths/juce_Matrix.h index a1c3c972e3..59018a0501 100644 --- a/modules/juce_dsp/maths/juce_Matrix.h +++ b/modules/juce_dsp/maths/juce_Matrix.h @@ -143,7 +143,7 @@ public: /** Scalar multiplication */ inline Matrix& operator*= (ElementType scalar) noexcept { - std::for_each (begin(), end(), [scalar] (ElementType& x) { x*= scalar; }); + std::for_each (begin(), end(), [scalar] (ElementType& x) { x *= scalar; }); return *this; }