[Bf-blender-cvs] [b92ef379b7b] master: Cleanup: clang-tidy
Aaron Carlisle
noreply at git.blender.org
Wed Dec 29 03:53:49 CET 2021
Commit: b92ef379b7bb9ebbe881cb7194b00af151f47926
Author: Aaron Carlisle
Date: Tue Dec 28 21:53:41 2021 -0500
Branches: master
https://developer.blender.org/rBb92ef379b7bb9ebbe881cb7194b00af151f47926
Cleanup: clang-tidy
Fixes two instances of `-Wunused-but-set-variable`
There are several more of these but these were low hanging
and noisy with one being in a header functions.
===================================================================
M source/blender/freestyle/intern/image/GaussianFilter.h
M source/blender/freestyle/intern/stroke/Operators.cpp
===================================================================
diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h
index af537cf2d86..f6bfdbd31b0 100644
--- a/source/blender/freestyle/intern/image/GaussianFilter.h
+++ b/source/blender/freestyle/intern/image/GaussianFilter.h
@@ -123,7 +123,7 @@ class GaussianFilter {
template<class Map> float GaussianFilter::getSmoothedPixel(Map *map, int x, int y)
{
- float sum = 0.0f;
+ // float sum = 0.0f;
float L = 0.0f;
int w = (int)map->width(); // soc
int h = (int)map->height(); // soc
@@ -142,7 +142,7 @@ template<class Map> float GaussianFilter::getSmoothedPixel(Map *map, int x, int
float tmpL = map->pixel(x + j, y + i);
float m = _mask[abs(i) * _storedMaskSize + abs(j)];
L += m * tmpL;
- sum += m;
+ // sum += m;
}
}
// L /= sum;
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index c73bb739e47..cdb85817a85 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -885,7 +885,7 @@ static int __recursiveSplit(Chain *_curve,
#endif
real _min = FLT_MAX;
++it;
- real mean = 0.0f;
+ // real mean = 0.0f;
// soc unused - real variance = 0.0f;
unsigned count = 0;
CurveInternal::CurvePointIterator next = it;
@@ -904,14 +904,14 @@ static int __recursiveSplit(Chain *_curve,
if (func(it0d) < 0) {
return -1;
}
- mean += func.result;
+ // mean += func.result;
if (func.result < _min) {
_min = func.result;
split = it;
bsplit = true;
}
}
- mean /= (float)count;
+ // mean /= (float)count;
// if ((!bsplit) || (mean - _min > mean)) { // we didn't find any minimum
if (!bsplit) { // we didn't find any minimum
More information about the Bf-blender-cvs
mailing list