Skip to content

Commit

Permalink
fix(vehicle velocity converter): suppress warnings (autowarefoundatio…
Browse files Browse the repository at this point in the history
…n#295)

* feat: add Werror

Signed-off-by: h-ohta <hiroki.ota@tier4.jp>

* fix: fix deprecated-declarations

Signed-off-by: h-ohta <hiroki.ota@tier4.jp>
  • Loading branch information
h-ohta authored Feb 2, 2022
1 parent 31e7748 commit 7f21872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions localization/vehicle_velocity_converter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wno-unused-parameter)
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

# find dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
VehicleVelocityConverter::VehicleVelocityConverter() : Node("vehicle_velocity_converter")
{
// set covariance value for twist with covariance msg
declare_parameter("twist_covariance");
std::vector<double> covariance = get_parameter("twist_covariance").as_double_array();
std::vector<double> covariance = declare_parameter<std::vector<double>>("twist_covariance");
for (std::size_t i = 0; i < covariance.size(); ++i) {
twist_covariance_[i] = covariance[i];
}
Expand Down

0 comments on commit 7f21872

Please sign in to comment.