Message ID | 20251014075252.2876485-4-stefan.klug@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
2025. 10. 14. 9:52 keltezéssel, Stefan Klug írta: > Replace assert() by ASSERT() and drop a set of unnecessary curly braces. > Those were noticed in the former review but after the series was > applied. Fix them now. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > --- Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/ipa/rkisp1/algorithms/lsc.cpp | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp > index ab0ada4eed46..c581e6441853 100644 > --- a/src/ipa/rkisp1/algorithms/lsc.cpp > +++ b/src/ipa/rkisp1/algorithms/lsc.cpp > @@ -33,11 +33,10 @@ template<typename T> > void interpolateVector(const std::vector<T> &a, const std::vector<T> &b, > std::vector<T> &dest, double lambda) > { > - assert(a.size() == b.size()); > + ASSERT(a.size() == b.size()); > dest.resize(a.size()); > - for (size_t i = 0; i < a.size(); i++) { > + for (size_t i = 0; i < a.size(); i++) > dest[i] = a[i] * (1.0 - lambda) + b[i] * lambda; > - } > } > > template<> > @@ -167,8 +166,8 @@ private: > double h = cropRectangle_.height / m; > std::vector<uint16_t> res; > > - assert(xSizes_.size() * 2 + 1 == k); > - assert(ySizes_.size() * 2 + 1 == k); > + ASSERT(xSizes_.size() * 2 + 1 == k); > + ASSERT(ySizes_.size() * 2 + 1 == k); > > res.reserve(k * k); >
diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index ab0ada4eed46..c581e6441853 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -33,11 +33,10 @@ template<typename T> void interpolateVector(const std::vector<T> &a, const std::vector<T> &b, std::vector<T> &dest, double lambda) { - assert(a.size() == b.size()); + ASSERT(a.size() == b.size()); dest.resize(a.size()); - for (size_t i = 0; i < a.size(); i++) { + for (size_t i = 0; i < a.size(); i++) dest[i] = a[i] * (1.0 - lambda) + b[i] * lambda; - } } template<> @@ -167,8 +166,8 @@ private: double h = cropRectangle_.height / m; std::vector<uint16_t> res; - assert(xSizes_.size() * 2 + 1 == k); - assert(ySizes_.size() * 2 + 1 == k); + ASSERT(xSizes_.size() * 2 + 1 == k); + ASSERT(ySizes_.size() * 2 + 1 == k); res.reserve(k * k);
Replace assert() by ASSERT() and drop a set of unnecessary curly braces. Those were noticed in the former review but after the series was applied. Fix them now. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/rkisp1/algorithms/lsc.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)