Skip to content

Commit

Permalink
fix(autoware_image_transport_decompressor): fix bugprone-branch-clone (
Browse files Browse the repository at this point in the history
…#9724)

fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Dec 23, 2024
1 parent ffbddad commit e2a5eee
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,12 @@ void ImageTransportDecompressor::onCompressedImage(
}
} else {
std::string image_encoding;
if (encoding_ == std::string("default")) {
image_encoding = input_compressed_image_msg->format.substr(0, split_pos);
} else if (encoding_ == std::string("rgb8")) {
if (encoding_ == std::string("rgb8")) {
image_encoding = "rgb8";
} else if (encoding_ == std::string("bgr8")) {
image_encoding = "bgr8";
} else {
// default encoding
image_encoding = input_compressed_image_msg->format.substr(0, split_pos);
}

Expand Down

0 comments on commit e2a5eee

Please sign in to comment.