Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jun 12, 2023
1 parent a5b16e7 commit 8364ab7
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 164 deletions.
2 changes: 1 addition & 1 deletion CARET_trace/include/caret_trace/container_traits.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/// @brief Type traits for container.
/// @tparam ...Args Container types.
template<typename ... Args>
template <typename... Args>
class ContainerTraits
{
public:
Expand Down
88 changes: 44 additions & 44 deletions CARET_trace/include/caret_trace/data_container.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -184,241 +184,241 @@ class DataContainer : public DataContainerInterface
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_add_callback_group(Args... args)
{
return add_callback_group_->store(args ...);
return add_callback_group_->store(args...);
}

/// @brief Store data for add_callback_group_static_executor trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_add_callback_group_static_executor(Args... args)
{
return add_callback_group_static_executor_->store(args ...);
return add_callback_group_static_executor_->store(args...);
}

/// @brief Store data for callback_group_add_client trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_callback_group_add_client(Args... args)
{
return callback_group_add_client_->store(args ...);
return callback_group_add_client_->store(args...);
}

/// @brief Store data for callback_group_add_service trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_callback_group_add_service(Args... args)
{
return callback_group_add_service_->store(args ...);
return callback_group_add_service_->store(args...);
}

/// @brief Store data for callback_group_add_subscription trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_callback_group_add_subscription(Args... args)
{
return callback_group_add_subscription_->store(args ...);
return callback_group_add_subscription_->store(args...);
}

/// @brief Store data for callback_group_add_timer trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_callback_group_add_timer(Args... args)
{
return callback_group_add_timer_->store(args ...);
return callback_group_add_timer_->store(args...);
}

/// @brief Store data for construct_executor trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_construct_executor(Args... args)
{
return construct_executor_->store(args ...);
return construct_executor_->store(args...);
}

/// @brief Store data for construct_static_executor trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_construct_static_executor(Args... args)
{
return construct_static_executor_->store(args ...);
return construct_static_executor_->store(args...);
}

/// @brief Store data for rcl_node_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_node_init(Args... args)
{
return rcl_node_init_->store(args ...);
return rcl_node_init_->store(args...);
}

/// @brief Store data for rcl_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_init(Args... args)
{
return rcl_init_->store(args ...);
return rcl_init_->store(args...);
}

/// @brief Store data for rcl_subscription_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_subscription_init(Args... args)
{
return rcl_subscription_init_->store(args ...);
return rcl_subscription_init_->store(args...);
}

/// @brief Store data for rclcpp_callback_register trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rclcpp_callback_register(Args... args)
{
return rclcpp_callback_register_->store(args ...);
return rclcpp_callback_register_->store(args...);
}

/// @brief Store data for rclcpp_subscription_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rclcpp_subscription_init(Args... args)
{
return rclcpp_subscription_init_->store(args ...);
return rclcpp_subscription_init_->store(args...);
}

/// @brief Store data for rclcpp_subscription_callback_added trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rclcpp_subscription_callback_added(Args... args)
{
return rclcpp_subscription_callback_added_->store(args ...);
return rclcpp_subscription_callback_added_->store(args...);
}

/// @brief Store data for rclcpp_timer_callback_added trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rclcpp_timer_callback_added(Args... args)
{
return rclcpp_timer_callback_added_->store(args ...);
return rclcpp_timer_callback_added_->store(args...);
}

/// @brief Store data for rclcpp_timer_link_node trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rclcpp_timer_link_node(Args... args)
{
return rclcpp_timer_link_node_->store(args ...);
return rclcpp_timer_link_node_->store(args...);
}

/// @brief Store data for rcl_timer_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_timer_init(Args... args)
{
return rcl_timer_init_->store(args ...);
return rcl_timer_init_->store(args...);
}

/// @brief Store data for rcl_publisher_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_publisher_init(Args... args)
{
return rcl_publisher_init_->store(args ...);
return rcl_publisher_init_->store(args...);
}

/// @brief Store data for rcl_client_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_client_init(Args... args)
{
return rcl_client_init_->store(args ...);
return rcl_client_init_->store(args...);
}

/// @brief Store data for rclcpp_service_callback_added trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rclcpp_service_callback_added(Args... args)
{
return rclcpp_service_callback_added_->store(args ...);
return rclcpp_service_callback_added_->store(args...);
}

/// @brief Store data for rcl_service_init trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rcl_service_init(Args... args)
{
return rcl_service_init_->store(args ...);
return rcl_service_init_->store(args...);
}

/// @brief Store data for rmw_implementation trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template<typename ... Args>
template <typename... Args>
bool store_rmw_implementation(Args... args)
{
return rmw_implementation_->store(args ...);
return rmw_implementation_->store(args...);
}

/// @brief Assign recording function for add_callback_group trace points.
Expand Down
29 changes: 13 additions & 16 deletions CARET_trace/include/caret_trace/keys_set.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#include <type_traits>

/// @private
template<bool Cond, typename Then, typename Else>
template <bool Cond, typename Then, typename Else>
struct if_
{
using type = Then;
};

/// @private
template<typename Then, typename Else>
template <typename Then, typename Else>
struct if_<false, Then, Else>
{
using type = Else;
Expand Down Expand Up @@ -74,21 +74,18 @@ class HashableKeys
public:
/// @brief Construct an instance.
/// @param key1 first argument.
explicit HashableKeys(T1 key1)
: key1_(key1) {}
explicit HashableKeys(T1 key1) : key1_(key1) {}

/// @brief Construct an instance.
/// @param key1 first argument.
/// @param key2 second argument.
HashableKeys(T1 key1, T2 key2)
: key1_(key1), key2_(key2) {}
HashableKeys(T1 key1, T2 key2) : key1_(key1), key2_(key2) {}

/// @brief Construct an instance.
/// @param key1 first argument.
/// @param key2 second argument.
/// @param key3 third argument.
HashableKeys(T1 key1, T2 key2, T3 key3)
: key1_(key1), key2_(key2), key3_(key3) {}
HashableKeys(T1 key1, T2 key2, T3 key3) : key1_(key1), key2_(key2), key3_(key3) {}

/// @brief Construct an instance.
/// @param key1 first argument.
Expand Down Expand Up @@ -304,13 +301,13 @@ class HashableKeys

namespace std
{
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
struct hash<HashableKeys<T1, T2, T3, T4, T5, T6>>
{
size_t operator()(const HashableKeys<T1, T2, T3, T4, T5, T6> & t) const {return t.hash();}
size_t operator()(const HashableKeys<T1, T2, T3, T4, T5, T6> & t) const { return t.hash(); }
};

template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
struct equal_to<HashableKeys<T1, T2, T3, T4, T5, T6>>
{
size_t operator()(
Expand Down Expand Up @@ -417,10 +414,10 @@ class KeysSet
/// @param key4 Fourth argument.
/// @param key5 Fifth argument.
/// @return True if it contains, false otherwise.
void insert(HashableKeys<T1, T2, T3, T4, T5, T6> keys) {keys_.insert(keys);}
void insert(HashableKeys<T1, T2, T3, T4, T5, T6> keys) { keys_.insert(keys); }

/// @brief Clear set.
void clear() {keys_.clear();}
void clear() { keys_.clear(); }

/// @brief Confirm content.
/// @param key1 First argument.
Expand Down Expand Up @@ -494,15 +491,15 @@ class KeysSet

/// @brief Get const iterator
/// @return Iterator referring to the first element.
ConstIteratorT begin() const {return keys_.cbegin();}
ConstIteratorT begin() const { return keys_.cbegin(); }

/// @brief Get const iterator
/// @return Iterator referring to the last element.
ConstIteratorT end() const {return keys_.cend();}
ConstIteratorT end() const { return keys_.cend(); }

/// @brief Get size.
/// @return Element number.
size_t size() const {return keys_.size();}
size_t size() const { return keys_.size(); }

private:
SetT keys_;
Expand Down
3 changes: 1 addition & 2 deletions CARET_trace/include/caret_trace/lttng_session.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class LttngSession
class LttngSessionImpl : public LttngSession
{
public:
LttngSessionImpl()
: started_session_running_(is_session_running()) {}
LttngSessionImpl() : started_session_running_(is_session_running()) {}

~LttngSessionImpl() {}

Expand Down
Loading

0 comments on commit 8364ab7

Please sign in to comment.