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
…autowarefoundation#9724)

fix: bugprone-error

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored and kminoda committed Dec 25, 2024
1 parent a40b700 commit d63f0d5
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 d63f0d5

Please sign in to comment.