From 954ce94e3f071f9aac428b87d4d64a68e6d0f720 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Sat, 22 May 2021 11:15:35 +0200 Subject: [PATCH] cppcheck clean rtengine/EdgePreservingDecomposition.h --- rtengine/EdgePreservingDecomposition.cc | 2 +- rtengine/EdgePreservingDecomposition.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 5ae023122..dcb05c29a 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -208,7 +208,7 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) return true; } -inline int MultiDiagonalSymmetricMatrix::FindIndex(int StartRow) +inline int MultiDiagonalSymmetricMatrix::FindIndex(int StartRow) const { //There's GOT to be a better way to do this. "Bidirectional map?" // Issue 1895 : Changed start of loop from zero to one diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index c90123ed3..73a7b1732 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -97,7 +97,7 @@ public: int *StartRows; bool CreateDiagonal(int index, int StartRow); int n, m; //The matrix is n x n, with m diagonals on the lower triangle. Don't change these. They should be private but aren't for convenience. - inline int DiagonalLength(int StartRow) //Gives number of elements in a diagonal. + inline int DiagonalLength(int StartRow) const //Gives number of elements in a diagonal. { return n - StartRow; }; @@ -109,7 +109,7 @@ public: void VectorProduct(float *Product, float *x); //Given the start row, attempts to find the corresponding index, or -1 if the StartRow doesn't exist. - inline int FindIndex(int StartRow) __attribute__((always_inline)); + inline int FindIndex(int StartRow) const __attribute__((always_inline)); //This is the same as above, but designed to take this class as a pass through variable. By this way you can feed //the meat of this class into an independent function, such as SparseConjugateGradient.