Skip to content

Commit dc1a403

Browse files
author
Chen Lihui
committed
address uncrustify and cpplin issues
Signed-off-by: Chen Lihui <[email protected]>
1 parent b923288 commit dc1a403

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

rclcpp/include/rclcpp/typesupport_helpers.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <sstream>
2222
#include <stdexcept>
2323
#include <string>
24-
#include <tuple>
24+
#include <utility>
2525

2626
#include "rcpputils/shared_library.hpp"
2727
#include "rosidl_runtime_cpp/action_type_support_decl.hpp"
@@ -46,7 +46,8 @@ namespace internal
4646
{
4747

4848
/// The type support of ros idl
49-
enum class TypeSupport {
49+
enum class TypeSupport
50+
{
5051
UNKNOWN,
5152
MESSAGE,
5253
SERVICE,
@@ -74,7 +75,7 @@ SymbolNameErrorFuncPair get_typesupport_symbol_name(
7475
* \param[in] library The shared type support library
7576
* \return A type support handle
7677
*/
77-
template <typename T = rosidl_message_type_support_t>
78+
template<typename T = rosidl_message_type_support_t>
7879
const T *
7980
get_typesupport_handle(
8081
const std::string & type,
@@ -98,10 +99,10 @@ get_typesupport_handle(
9899
return get_ts();
99100
} catch (std::runtime_error &) {
100101
auto mk_error = [&ret](auto reason) {
101-
std::stringstream extr_error;
102-
extr_error << " " << reason;
103-
return (std::get<1>(ret))() + extr_error.str();
104-
};
102+
std::stringstream extr_error;
103+
extr_error << " " << reason;
104+
return (std::get<1>(ret))() + extr_error.str();
105+
};
105106
throw std::runtime_error{mk_error("Library could not be found.")};
106107
}
107108
}

rclcpp/src/rclcpp/typesupport_helpers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ namespace internal
9999
SymbolNameErrorFuncPair get_typesupport_symbol_name(
100100
const std::string & type,
101101
const std::string & typesupport_identifier,
102-
TypeSupport type_support
103-
) {
102+
TypeSupport type_support)
103+
{
104104
std::string package_name;
105105
std::string middle_module;
106106
std::string type_name;
@@ -149,7 +149,7 @@ SymbolNameErrorFuncPair get_typesupport_symbol_name(
149149
return {std::move(symbol_name), std::move(mk_error)};
150150
}
151151

152-
} // internal namespace
152+
} // namespace internal
153153

154154
std::shared_ptr<rcpputils::SharedLibrary>
155155
get_typesupport_library(const std::string & type, const std::string & typesupport_identifier)

0 commit comments

Comments
 (0)