Skip to content

Commit 4045fb3

Browse files
authored
fix(autoware_image_diagnostics): fix bugprone-branch-clone (#9723)
fix: bugprone-error Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent 97bc5a7 commit 4045fb3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sensing/autoware_image_diagnostics/src/image_diagnostics_node.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,9 @@ void ImageDiagNode::ImageChecker(const sensor_msgs::msg::Image::ConstSharedPtr i
171171
cv::rectangle(
172172
diag_block_image, cv::Point(x, y), cv::Point(x + block_size_h, y + block_size_v),
173173
state_color_map_["BLOCKAGE"], -1, cv::LINE_AA);
174-
} else if (region_state_vec[j] == Image_State::LOW_VIS) {
175-
cv::rectangle(
176-
diag_block_image, cv::Point(x, y), cv::Point(x + block_size_h, y + block_size_v),
177-
state_color_map_["BACKLIGHT"], -1, cv::LINE_AA);
178-
} else if (region_state_vec[j] == Image_State::BACKLIGHT) {
174+
} else if (
175+
region_state_vec[j] == Image_State::LOW_VIS ||
176+
region_state_vec[j] == Image_State::BACKLIGHT) {
179177
cv::rectangle(
180178
diag_block_image, cv::Point(x, y), cv::Point(x + block_size_h, y + block_size_v),
181179
state_color_map_["BACKLIGHT"], -1, cv::LINE_AA);

0 commit comments

Comments
 (0)