Merge pull request #88 from ros2/typedef-using
Replace usage of typedef with using
This commit is contained in:
commit
ea94fde05c
8 changed files with 22 additions and 22 deletions
|
@ -93,11 +93,11 @@ template<typename ServiceT>
|
|||
class Client : public ClientBase
|
||||
{
|
||||
public:
|
||||
typedef std::promise<typename ServiceT::Response::SharedPtr> Promise;
|
||||
typedef std::shared_ptr<Promise> SharedPromise;
|
||||
typedef std::shared_future<typename ServiceT::Response::SharedPtr> SharedFuture;
|
||||
using Promise = std::promise<typename ServiceT::Response::SharedPtr>;
|
||||
using SharedPromise = std::shared_ptr<Promise>;
|
||||
using SharedFuture = std::shared_future<typename ServiceT::Response::SharedPtr>;
|
||||
|
||||
typedef std::function<void (SharedFuture)> CallbackType;
|
||||
using CallbackType = std::function<void(SharedFuture)>;
|
||||
|
||||
RCLCPP_SMART_PTR_DEFINITIONS(Client);
|
||||
|
||||
|
|
|
@ -861,11 +861,11 @@ private:
|
|||
RCLCPP_DISABLE_COPY(Executor);
|
||||
|
||||
std::vector<std::weak_ptr<rclcpp::node::Node>> weak_nodes_;
|
||||
typedef std::list<void *> SubscriberHandles;
|
||||
using SubscriberHandles = std::list<void *>;
|
||||
SubscriberHandles subscriber_handles_;
|
||||
typedef std::list<void *> ServiceHandles;
|
||||
using ServiceHandles = std::list<void *>;
|
||||
ServiceHandles service_handles_;
|
||||
typedef std::list<void *> ClientHandles;
|
||||
using ClientHandles = std::list<void *>;
|
||||
ClientHandles client_handles_;
|
||||
|
||||
};
|
||||
|
|
|
@ -151,9 +151,9 @@ public:
|
|||
rclcpp::timer::CallbackType callback,
|
||||
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr);
|
||||
|
||||
typedef rclcpp::callback_group::CallbackGroup CallbackGroup;
|
||||
typedef std::weak_ptr<CallbackGroup> CallbackGroupWeakPtr;
|
||||
typedef std::list<CallbackGroupWeakPtr> CallbackGroupWeakPtrList;
|
||||
using CallbackGroup = rclcpp::callback_group::CallbackGroup;
|
||||
using CallbackGroupWeakPtr = std::weak_ptr<CallbackGroup>;
|
||||
using CallbackGroupWeakPtrList = std::list<CallbackGroupWeakPtr>;
|
||||
|
||||
/* Create and return a Client. */
|
||||
template<typename ServiceT>
|
||||
|
|
|
@ -112,8 +112,8 @@ private:
|
|||
|
||||
};
|
||||
|
||||
typedef GenericRate<std::chrono::system_clock> Rate;
|
||||
typedef GenericRate<std::chrono::steady_clock> WallRate;
|
||||
using Rate = GenericRate<std::chrono::system_clock>;
|
||||
using WallRate = GenericRate<std::chrono::steady_clock>;
|
||||
|
||||
} // namespace rate
|
||||
} // namespace rclcpp
|
||||
|
|
|
@ -60,7 +60,7 @@ using rclcpp::rate::WallRate;
|
|||
using rclcpp::timer::GenericTimer;
|
||||
using rclcpp::timer::TimerBase;
|
||||
using rclcpp::timer::WallTimer;
|
||||
typedef rclcpp::context::Context::SharedPtr ContextSharedPtr;
|
||||
using ContextSharedPtr = rclcpp::context::Context::SharedPtr;
|
||||
using rclcpp::utilities::ok;
|
||||
using rclcpp::utilities::shutdown;
|
||||
using rclcpp::utilities::init;
|
||||
|
|
|
@ -95,16 +95,16 @@ template<typename ServiceT>
|
|||
class Service : public ServiceBase
|
||||
{
|
||||
public:
|
||||
typedef std::function<
|
||||
void (
|
||||
using CallbackType = std::function<
|
||||
void(
|
||||
const std::shared_ptr<typename ServiceT::Request> &,
|
||||
std::shared_ptr<typename ServiceT::Response> &)> CallbackType;
|
||||
std::shared_ptr<typename ServiceT::Response> &)>;
|
||||
|
||||
typedef std::function<
|
||||
void (
|
||||
using CallbackWithHeaderType = std::function<
|
||||
void(
|
||||
const std::shared_ptr<rmw_request_id_t> &,
|
||||
const std::shared_ptr<typename ServiceT::Request> &,
|
||||
std::shared_ptr<typename ServiceT::Response> &)> CallbackWithHeaderType;
|
||||
std::shared_ptr<typename ServiceT::Response> &)>;
|
||||
RCLCPP_SMART_PTR_DEFINITIONS(Service);
|
||||
|
||||
Service(
|
||||
|
|
|
@ -96,7 +96,7 @@ template<typename MessageT>
|
|||
class Subscription : public SubscriptionBase
|
||||
{
|
||||
public:
|
||||
typedef std::function<void (const std::shared_ptr<MessageT> &)> CallbackType;
|
||||
using CallbackType = std::function<void(const std::shared_ptr<MessageT> &)>;
|
||||
RCLCPP_SMART_PTR_DEFINITIONS(Subscription);
|
||||
|
||||
Subscription(
|
||||
|
|
|
@ -40,7 +40,7 @@ class Executor;
|
|||
namespace timer
|
||||
{
|
||||
|
||||
typedef std::function<void ()> CallbackType;
|
||||
using CallbackType = std::function<void()>;
|
||||
|
||||
class TimerBase
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ private:
|
|||
|
||||
};
|
||||
|
||||
typedef GenericTimer<std::chrono::steady_clock> WallTimer;
|
||||
using WallTimer = GenericTimer<std::chrono::steady_clock>;
|
||||
|
||||
} /* namespace timer */
|
||||
} /* namespace rclcpp */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue