Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default C++ and boost::placeholders::_N instead of deprecated _N #350

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions grid_map_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_core)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -158,4 +157,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
1 change: 0 additions & 1 deletion grid_map_costmap_2d/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_costmap_2d)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
3 changes: 1 addition & 2 deletions grid_map_cv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_cv)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set(CMAKE_CXX_STANDARD 17)

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is that I assume every system this is building on now is >= 11 so on Ubuntu 20.04 the default will be 14, and on 22.04 it will be 17, there's no reason to hold it back at 11.

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -135,4 +134,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
2 changes: 1 addition & 1 deletion grid_map_cv/src/InpaintFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include "grid_map_cv/InpaintFilter.hpp"
#include <pluginlib/class_list_macros.h>
#include <pluginlib/class_list_macros.hpp>
#include <ros/ros.h>

// Grid Map
Expand Down
2 changes: 1 addition & 1 deletion grid_map_filters/src/plugins.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <pluginlib/class_list_macros.h>
#include <pluginlib/class_list_macros.hpp>

#include "grid_map_filters/BufferNormalizerFilter.hpp"
#include "grid_map_filters/ColorBlendingFilter.hpp"
Expand Down
3 changes: 1 addition & 2 deletions grid_map_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_loader)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -107,4 +106,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
3 changes: 1 addition & 2 deletions grid_map_octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_octomap)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -133,4 +132,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
3 changes: 1 addition & 2 deletions grid_map_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_ros)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -145,4 +144,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
1 change: 0 additions & 1 deletion grid_map_rviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_rviz_plugin)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <grid_map_core/GridMap.hpp>

namespace Ogre {
class Vector3;
class Quaternion;
class ManualObject;
class ColourValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <tf2_ros/buffer.h>
#include <geometry_msgs/Pose.h>

#include <OgreVector3.h>
#include <rviz/ogre_helpers/ogre_vector.h>
#include <OgreQuaternion.h>

#include <boost/thread/mutex.hpp>
Expand Down Expand Up @@ -192,9 +192,11 @@ class FrameManager : public QObject
template <class M>
void registerFilterForTransformStatusCheck(tf2_ros::MessageFilter<M>* filter, Display* display)
{
filter->registerCallback(boost::bind(&FrameManager::messageCallback<M>, this, _1, display));
filter->registerCallback(boost::bind(&FrameManager::messageCallback<M>, this,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With c++14 it is recommended to use lambdas, not?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a smaller change for right now, would prefer to get this in and look into other options later, and I think still is backwards compatible back to c++11 if that is a concern for any other users (but possibly lambdas are too? Would have to look into it).

boost::placeholders::_1, display));
filter->registerFailureCallback(boost::bind(
&FrameManager::failureCallback<M, tf2_ros::FilterFailureReason>, this, _1, _2, display));
&FrameManager::failureCallback<M, tf2_ros::FilterFailureReason>, this,
boost::placeholders::_1, boost::placeholders::_2, display));
}

/** @brief Return the current fixed frame name. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class MessageFilterDisplay : public _RosTopicDisplay {
tf_filter_ = new tf2_ros::MessageFilter<MessageType>(*context_->getTF2BufferPtr(), fixed_frame_.toStdString(), 1u, update_nh_);

tf_filter_->connectInput(sub_);
tf_filter_->registerCallback(boost::bind(&MessageFilterDisplay<MessageType>::incomingMessage, this, _1));
tf_filter_->registerCallback(boost::bind(&MessageFilterDisplay<MessageType>::incomingMessage, this,
boost::placeholders::_1));
context_->getFrameManager()->registerFilterForTransformStatusCheck(tf_filter_, this);
}

Expand Down
2 changes: 1 addition & 1 deletion grid_map_rviz_plugin/src/GridMapDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,5 @@ void GridMapDisplay::updateColorMapList()

} // end namespace grid_map_rviz_plugin

#include <pluginlib/class_list_macros.h>
#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(grid_map_rviz_plugin::GridMapDisplay, rviz::Display)
2 changes: 1 addition & 1 deletion grid_map_rviz_plugin/src/GridMapVisual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <OGRE/OgreSceneNode.h>
#include <OGRE/OgreTechnique.h>
#include <OGRE/OgreTextureManager.h>
#include <OGRE/OgreVector3.h>
#include <rviz/ogre_helpers/billboard_line.h>
#include <rviz/ogre_helpers/ogre_vector.h>
#include <rviz/uniform_string_stream.h>
#include <chrono>

Expand Down
3 changes: 1 addition & 2 deletions grid_map_visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_visualization)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -145,4 +144,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)