Skip to content

Commit 1982a34

Browse files
a-maumaupre-commit-ci[bot]
authored and
KhalilSelyan
committed
refactor(localization_util): apply static analysis (#7399)
* refactor based on linter Signed-off-by: a-maumau <maumaumaumaumaumaumaumaumaumau@gmail.com> * style(pre-commit): autofix * apply suggestion Signed-off-by: a-maumau <maumaumaumaumaumaumaumaumaumau@gmail.com> --------- Signed-off-by: a-maumau <maumaumaumaumaumaumaumaumaumau@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8ba46a7 commit 1982a34

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

localization/localization_util/src/util_func.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ std_msgs::msg::ColorRGBA exchange_color_crc(double x)
2828
color.b = 1.0;
2929
color.g = static_cast<float>(std::sin(x * 2.0 * M_PI));
3030
color.r = 0;
31-
} else if (x > 0.25 && x <= 0.5) {
31+
} else if (x <= 0.5) {
3232
color.b = static_cast<float>(std::sin(x * 2 * M_PI));
3333
color.g = 1.0;
3434
color.r = 0;
35-
} else if (x > 0.5 && x <= 0.75) {
35+
} else if (x <= 0.75) {
3636
color.b = 0;
3737
color.g = 1.0;
3838
color.r = static_cast<float>(-std::sin(x * 2.0 * M_PI));

localization/localization_util/test/test_smart_pose_buffer.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,7 @@ bool compare_pose(
4242
pose_a.pose.pose.orientation.w == pose_b.pose.pose.orientation.w;
4343
}
4444

45-
class TestSmartPoseBuffer : public ::testing::Test
46-
{
47-
protected:
48-
void SetUp() override {}
49-
50-
void TearDown() override {}
51-
};
52-
53-
TEST_F(TestSmartPoseBuffer, interpolate_pose) // NOLINT
45+
TEST(TestSmartPoseBuffer, interpolate_pose) // NOLINT
5446
{
5547
rclcpp::Logger logger = rclcpp::get_logger("test_logger");
5648
const double pose_timeout_sec = 10.0;

0 commit comments

Comments
 (0)