Browse Source

DSP: Fixed an overly restrictive assertion in the Matrix multiplication operator

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
e3aede39d8
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/juce_dsp/maths/juce_Matrix.cpp
  2. +1
    -1
      modules/juce_dsp/maths/juce_Matrix.h

+ 1
- 1
modules/juce_dsp/maths/juce_Matrix.cpp View File

@@ -116,7 +116,7 @@ Matrix<ElementType> Matrix<ElementType>::operator* (const Matrix<ElementType>& 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;


+ 1
- 1
modules/juce_dsp/maths/juce_Matrix.h View File

@@ -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;
}


Loading…
Cancel
Save