@@ -188,10 +188,8 @@ constexpr Matrix<T, Rows, Cols> operator+(const Matrix<T, Rows, Cols> &m1, const
}
#ifndef __DOXYGEN__
-bool matrixValidateYaml(const ValueNode &obj, unsigned int size);
-#endif /* __DOXYGEN__ */
+bool matrixValidateValueNode(const ValueNode &obj, unsigned int size);
-#ifndef __DOXYGEN__
template<typename T, unsigned int Rows, unsigned int Cols>
std::ostream &operator<<(std::ostream &out, const Matrix<T, Rows, Cols> &m)
{
@@ -203,7 +201,7 @@ template<typename T, unsigned int Rows, unsigned int Cols>
struct ValueNode::Accessor<Matrix<T, Rows, Cols>> {
std::optional<Matrix<T, Rows, Cols>> get(const ValueNode &obj) const
{
- if (!matrixValidateYaml(obj, Rows * Cols))
+ if (!matrixValidateValueNode(obj, Rows * Cols))
return std::nullopt;
Matrix<T, Rows, Cols> matrix;
@@ -314,7 +314,7 @@ template bool matrixInvert<double>(Span<const double> data, Span<double> dataOut
* to the product of the number of rows and columns of the matrix (Rows x
* Cols). The values shall be stored in row-major order.
*/
-bool matrixValidateYaml(const ValueNode &obj, unsigned int size)
+bool matrixValidateValueNode(const ValueNode &obj, unsigned int size)
{
if (!obj.isList())
return false;
The matrixValidateYaml() function predates the refactoring of YamlObject and its rename to ValueNode. It now operates on a ValudeNode, disconnected from the YAML parser. Rename it to matrixValidateValueNode() accordingly. While at it, fold consecutive __DOXYGEN__ conditional blocks into a single one. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- include/libcamera/internal/matrix.h | 6 ++---- src/libcamera/matrix.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-)