Skip to content

Commit

Permalink
another CMatrixDynamic ctor made explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Nov 30, 2023
1 parent 9ac18fb commit 6b7284e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/source/doxygen-docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- BUG FIXES:
- Fix missing Threads::Threads downstream due to missing `find_dependency(Threads)` in MRPT cmake config files.
- Fix broken import of PLY files in SceneViewer3D (empty scene even if correctly imported).
- mrpt::math::CMatrixDynamic constructor from (row,col) was not marked explicit, leading to potential problems.


# Version 2.11.3: Released Nov 21st, 2023
Expand Down
5 changes: 4 additions & 1 deletion libs/math/include/mrpt/math/CMatrixDynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ class CMatrixDynamic : public MatrixBase<T, CMatrixDynamic<T>>
/** Constructors */
CMatrixDynamic(const CMatrixDynamic& m) { (*this) = m; }

CMatrixDynamic(size_t row = 0, size_t col = 0) { realloc(row, col); }
explicit CMatrixDynamic(size_t row = 0, size_t col = 0)
{
realloc(row, col);
}

/** Copy (casting from if needed) from another matrix */
template <typename U>
Expand Down

0 comments on commit 6b7284e

Please sign in to comment.