Fix linting errors
This commit is contained in:
parent
6cce113f04
commit
33f227b772
27 changed files with 668 additions and 563 deletions
|
@ -1,12 +1,12 @@
|
|||
#ifndef __TRACETOOLS_TRACETOOLS_H_
|
||||
#define __TRACETOOLS_TRACETOOLS_H_
|
||||
#ifndef TRACETOOLS__TRACETOOLS_H_
|
||||
#define TRACETOOLS__TRACETOOLS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define TRACEPOINT(event_name, ...) \
|
||||
(ros_trace_##event_name)(__VA_ARGS__)
|
||||
(ros_trace_ ## event_name)(__VA_ARGS__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@ -128,7 +128,7 @@ void TRACEPOINT(
|
|||
void TRACEPOINT(
|
||||
rcl_timer_init,
|
||||
const void * timer_handle,
|
||||
long period);
|
||||
int64_t period);
|
||||
|
||||
/**
|
||||
* tp: rclcpp_timer_callback_added
|
||||
|
@ -164,4 +164,4 @@ void TRACEPOINT(
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* __TRACETOOLS_TRACETOOLS_H_ */
|
||||
#endif /* TRACETOOLS__TRACETOOLS_H_ */
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
#ifndef __TRACETOOLS_UTILS_H_
|
||||
#define __TRACETOOLS_UTILS_H_
|
||||
#ifndef TRACETOOLS__UTILS_HPP_
|
||||
#define TRACETOOLS__UTILS_HPP_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <functional>
|
||||
|
||||
template<typename T, typename... U>
|
||||
size_t get_address(std::function<T(U...)> f) {
|
||||
typedef T(fnType)(U...);
|
||||
fnType ** fnPointer = f.template target<fnType*>();
|
||||
// Might be a lambda
|
||||
if (fnPointer == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
return (size_t)*fnPointer;
|
||||
template<typename T, typename ... U>
|
||||
size_t get_address(std::function<T(U...)> f)
|
||||
{
|
||||
typedef T (fnType)(U...);
|
||||
fnType ** fnPointer = f.template target<fnType *>();
|
||||
// Might be a lambda
|
||||
if (fnPointer == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
return (size_t)*fnPointer;
|
||||
}
|
||||
|
||||
const char * get_symbol(void * funptr);
|
||||
|
||||
#endif /* __TRACETOOLS_UTILS_H_ */
|
||||
#endif // TRACETOOLS__UTILS_HPP_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue