Skip to content

Commit e2a5eee

Browse files
authored
fix(autoware_image_transport_decompressor): fix bugprone-branch-clone (#9724)
fix: bugprone-error Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent ffbddad commit e2a5eee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sensing/autoware_image_transport_decompressor/src/image_transport_decompressor.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,12 @@ void ImageTransportDecompressor::onCompressedImage(
107107
}
108108
} else {
109109
std::string image_encoding;
110-
if (encoding_ == std::string("default")) {
111-
image_encoding = input_compressed_image_msg->format.substr(0, split_pos);
112-
} else if (encoding_ == std::string("rgb8")) {
110+
if (encoding_ == std::string("rgb8")) {
113111
image_encoding = "rgb8";
114112
} else if (encoding_ == std::string("bgr8")) {
115113
image_encoding = "bgr8";
116114
} else {
115+
// default encoding
117116
image_encoding = input_compressed_image_msg->format.substr(0, split_pos);
118117
}
119118

0 commit comments

Comments
 (0)