Skip to content

Commit

Permalink
lint fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanyen committed Apr 12, 2020
1 parent 805f62b commit 8855b5a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DWB_PLUGINS_SIMPLE_GOAL_CHECKER__VISIBILITY_CONTROL_H_
#define DWB_PLUGINS_SIMPLE_GOAL_CHECKER__VISIBILITY_CONTROL_H_
#ifndef DWB_PLUGINS__SIMPLE_GOAL_CHECKER_VISIBILITY_CONTROL_H_
#define DWB_PLUGINS__SIMPLE_GOAL_CHECKER_VISIBILITY_CONTROL_H_

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
Expand Down Expand Up @@ -46,4 +46,4 @@
#define DWB_PLUGINS_SIMPLE_GOAL_CHECKER_PUBLIC_TYPE
#endif

#endif // DWB_PLUGINS_SIMPLE_GOAL_CHECKER__VISIBILITY_CONTROL_H_
#endif // DWB_PLUGINS__SIMPLE_GOAL_CHECKER_VISIBILITY_CONTROL_H_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef NAV_2D_UTILS_CONVERSIONS__VISIBILITY_CONTROL_H_
#define NAV_2D_UTILS_CONVERSIONS__VISIBILITY_CONTROL_H_
#ifndef NAV_2D_UTILS__CONVERSIONS_VISIBILITY_CONTROL_H_
#define NAV_2D_UTILS__CONVERSIONS_VISIBILITY_CONTROL_H_

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
Expand Down Expand Up @@ -46,4 +46,4 @@
#define NAV_2D_UTILS_CONVERSIONS_PUBLIC_TYPE
#endif

#endif // NAV_2D_UTILS_CONVERSIONS__VISIBILITY_CONTROL_H_
#endif // NAV_2D_UTILS__CONVERSIONS_VISIBILITY_CONTROL_H_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef NAV_2D_UTILS_PATH_OPS__VISIBILITY_CONTROL_H_
#define NAV_2D_UTILS_PATH_OPS__VISIBILITY_CONTROL_H_
#ifndef NAV_2D_UTILS__PATH_OPS_VISIBILITY_CONTROL_H_
#define NAV_2D_UTILS__PATH_OPS_VISIBILITY_CONTROL_H_

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
Expand Down Expand Up @@ -46,4 +46,4 @@
#define NAV_2D_UTILS_PATH_OPS_PUBLIC_TYPE
#endif

#endif // NAV_2D_UTILS_PATH_OPS__VISIBILITY_CONTROL_H_
#endif // NAV_2D_UTILS__PATH_OPS_VISIBILITY_CONTROL_H_
4 changes: 3 additions & 1 deletion nav2_map_server/include/nav2_map_server/occ_grid_loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ namespace nav2_map_server
* @brief Parses the map yaml file and creates a service and a publisher that
* provides occupancy grid
*/
class NAV2_MAP_SERVER_PUBLIC OccGridLoader : public rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface
class
NAV2_MAP_SERVER_PUBLIC
OccGridLoader : public rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface
{
public:
/**
Expand Down
6 changes: 3 additions & 3 deletions nav2_util/include/nav2_util/map_loader/visibility_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef MAP_LOADER__VISIBILITY_CONTROL_H_
#define MAP_LOADER__VISIBILITY_CONTROL_H_
#ifndef NAV2_UTIL__MAP_LOADER__VISIBILITY_CONTROL_H_
#define NAV2_UTIL__MAP_LOADER__VISIBILITY_CONTROL_H_

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
Expand Down Expand Up @@ -46,4 +46,4 @@
#define MAP_LOADER_PUBLIC_TYPE
#endif

#endif // MAP_LOADER__VISIBILITY_CONTROL_H_
#endif // NAV2_UTIL__MAP_LOADER__VISIBILITY_CONTROL_H_
17 changes: 11 additions & 6 deletions nav2_util/include/nav2_util/node_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ namespace nav2_util
* \param[in] potential_node_name Potential name but possibly with invalid charaters.
* \return A copy of the input string but with non-alphanumeric characters replaced with '_'
*/
std::string NAV2_UTIL_PUBLIC sanitize_node_name(const std::string & potential_node_name);
NAV2_UTIL_PUBLIC
std::string sanitize_node_name(const std::string & potential_node_name);

/// Concatenate two namespaces to produce an absolute namespace
/**
* \param[in] top_ns The namespace to place first
* \param[in] sub_ns The namespace to place after top_ns
* \return An absolute namespace starting with "/"
*/
std::string NAV2_UTIL_PUBLIC add_namespaces(const std::string & top_ns, const std::string & sub_ns = "");
NAV2_UTIL_PUBLIC
std::string add_namespaces(const std::string & top_ns, const std::string & sub_ns = "");

/// Add some random characters to a node name to ensure it is unique in the system
/**
Expand All @@ -53,7 +55,8 @@ std::string NAV2_UTIL_PUBLIC add_namespaces(const std::string & top_ns, const st
* \param[in] prefix A string to help understand the purpose of the node.
* \return A copy of the prefix + '_' + 8 random digits. eg. prefix_12345678
*/
std::string NAV2_UTIL_PUBLIC generate_internal_node_name(const std::string & prefix = "");
NAV2_UTIL_PUBLIC
std::string generate_internal_node_name(const std::string & prefix = "");

/// Creates a node with a name as generated by generate_internal_node_name
/**
Expand All @@ -65,7 +68,8 @@ std::string NAV2_UTIL_PUBLIC generate_internal_node_name(const std::string & pre
* \param[in] prefix A string to help understand the purpose of the node.
* \return A shared_ptr to the node.
*/
rclcpp::Node::SharedPtr NAV2_UTIL_PUBLIC generate_internal_node(const std::string & prefix = "");
NAV2_UTIL_PUBLIC
rclcpp::Node::SharedPtr generate_internal_node(const std::string & prefix = "");

/// Generates a pseudo random string of digits.
/**
Expand All @@ -76,10 +80,11 @@ rclcpp::Node::SharedPtr NAV2_UTIL_PUBLIC generate_internal_node(const std::strin
* \param[in] len Length of the output string
* \return A string containing random digits
*/
std::string NAV2_UTIL_PUBLIC time_to_string(size_t len);
NAV2_UTIL_PUBLIC
std::string time_to_string(size_t len);

rclcpp::NodeOptions
NAV2_UTIL_PUBLIC
rclcpp::NodeOptions
get_node_options_default(bool allow_undeclared = true, bool declare_initial_params = true);

template<typename NodeT>
Expand Down

0 comments on commit 8855b5a

Please sign in to comment.