Skip to content

Commit c9e5a1c

Browse files
committed
fixing cast error from precomit
1 parent db5fcca commit c9e5a1c

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

image-filtering/include/image_filtering/lib/filters/median_binary.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ class MedianBinary : public Filter {
2525

2626
inline void MedianBinary::apply_filter(const cv::Mat& original,
2727
cv::Mat& filtered) const {
28-
2928
odd_int kernel_size = odd_int(this->filter_params_.kernel_size);
30-
apply_median(original, filtered, int(kernel_size));
29+
apply_median(original, filtered, static_cast<int>(kernel_size));
3130
apply_fixed_threshold(filtered, filtered, this->filter_params_.threshold,
3231
this->filter_params_.invert);
3332
}

image-filtering/include/image_filtering/lib/utilities.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,22 @@ void apply_fixed_threshold(const cv::Mat& img,
4848
cv::Mat& filtered,
4949
int thresh,
5050
bool invert = false);
51-
52-
// For values that is required to be odd and biger than one
51+
52+
// For values that is required to be odd and bigger than one
5353
struct odd_int {
5454
int value;
55-
55+
5656
explicit odd_int(int v) : value(v) {
5757
if (v <= 1 || (v % 2) == 0) {
5858
throw std::invalid_argument("odd_int must be odd and > 1");
5959
}
6060
}
61-
61+
6262
// Allow passing to APIs that expect int without changing call sites
6363
operator int() const noexcept { return value; }
64-
6564

6665
int get() const noexcept { return value; }
6766
};
68-
} // namespace vortex::image_filtering_
67+
} // namespace vortex::image_filtering
6968

7069
#endif // IMAGE_FILTERING__LIB__UTILITIES_HPP_

0 commit comments

Comments
 (0)