Skip to content

Commit

Permalink
Fix Indent and replace .h with .hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KuraZuzu committed Nov 22, 2024
1 parent 8098d9e commit 89e2187
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>

#include "raspimouse_msgs/msg/switches.hpp"
#include "raspimouse_ros2_examples/visibility_control.h"
#include "raspimouse_ros2_examples/visibility_control.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "rclcpp_lifecycle/lifecycle_publisher.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>
#include <vector>

#include "raspimouse_ros2_examples/visibility_control.h"
#include "raspimouse_ros2_examples/visibility_control.hpp"
#include "raspimouse_msgs/msg/switches.hpp"
#include "rclcpp/rclcpp.hpp"
#include "sensor_msgs/msg/imu.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>
#include <vector>

#include "raspimouse_ros2_examples/visibility_control.h"
#include "raspimouse_ros2_examples/visibility_control.hpp"
#include "raspimouse_msgs/msg/switches.hpp"
#include "raspimouse_msgs/msg/light_sensors.hpp"
#include "raspimouse_msgs/msg/leds.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <memory>
#include <string>

#include "raspimouse_ros2_examples/visibility_control.h"
#include "raspimouse_ros2_examples/visibility_control.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "rclcpp_lifecycle/lifecycle_publisher.hpp"
Expand Down
57 changes: 0 additions & 57 deletions include/raspimouse_ros2_examples/visibility_control.h

This file was deleted.

58 changes: 58 additions & 0 deletions include/raspimouse_ros2_examples/visibility_control.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright 2020-2024 RT Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef RASPIMOUSE_ROS2_EXAMPLES__VISIBILITY_CONTROL_HPP_
#define RASPIMOUSE_ROS2_EXAMPLES__VISIBILITY_CONTROL_HPP_

#ifdef __cplusplus
extern "C"
{
#endif

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility

#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define RASPIMOUSE_ROS2_EXAMPLES_EXPORT __attribute__ ((dllexport))
#define RASPIMOUSE_ROS2_EXAMPLES_IMPORT __attribute__ ((dllimport))
#else
#define RASPIMOUSE_ROS2_EXAMPLES_EXPORT __declspec(dllexport)
#define RASPIMOUSE_ROS2_EXAMPLES_IMPORT __declspec(dllimport)
#endif
#ifdef RASPIMOUSE_ROS2_EXAMPLES_BUILDING_DLL
#define RASPIMOUSE_ROS2_EXAMPLES_PUBLIC RASPIMOUSE_ROS2_EXAMPLES_EXPORT
#else
#define RASPIMOUSE_ROS2_EXAMPLES_PUBLIC RASPIMOUSE_ROS2_EXAMPLES_IMPORT
#endif
#define RASPIMOUSE_ROS2_EXAMPLES_PUBLIC_TYPE RASPIMOUSE_ROS2_EXAMPLES_PUBLIC
#define RASPIMOUSE_ROS2_EXAMPLES_LOCAL
#else
#define RASPIMOUSE_ROS2_EXAMPLES_EXPORT __attribute__ ((visibility("default")))
#define RASPIMOUSE_ROS2_EXAMPLES_IMPORT
#if __GNUC__ >= 4
#define RASPIMOUSE_ROS2_EXAMPLES_PUBLIC __attribute__ ((visibility("default")))
#define RASPIMOUSE_ROS2_EXAMPLES_LOCAL __attribute__ ((visibility("hidden")))
#else
#define RASPIMOUSE_ROS2_EXAMPLES_PUBLIC
#define RASPIMOUSE_ROS2_EXAMPLES_LOCAL
#endif
#define RASPIMOUSE_ROS2_EXAMPLES_PUBLIC_TYPE
#endif

#ifdef __cplusplus
}
#endif

#endif // RASPIMOUSE_ROS2_EXAMPLES__VISIBILITY_CONTROL_HPP_

0 comments on commit 89e2187

Please sign in to comment.