Skip to content

Commit

Permalink
Use _t types wherever possible
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Sep 14, 2021
1 parent 368b047 commit 00b9b48
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion rcl/include/rcl/arguments.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef struct rcl_arguments_impl_s rcl_arguments_impl_t;
typedef struct rcl_arguments_s
{
/// Private implementation pointer.
struct rcl_arguments_impl_s * impl;
rcl_arguments_impl_t * impl;
} rcl_arguments_t;

/// The command-line flag that delineates the start of ROS arguments.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef struct rcl_client_impl_s rcl_client_impl_t;
typedef struct rcl_client_s
{
/// Pointer to the client implementation
struct rcl_client_impl_s * impl;
rcl_client_impl_t * impl;
} rcl_client_t;

/// Options available for a rcl_client_t.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ typedef struct rcl_context_s
rcl_arguments_t global_arguments;

/// Implementation specific pointer.
struct rcl_context_impl_s * impl;
rcl_context_impl_t * impl;

// The assumption that this is big enough for an atomic_uint_least64_t is
// ensured with a static_assert in the context.c file.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct rcl_event_impl_s rcl_event_impl_t;
typedef struct rcl_event_s
{
/// Pointer to the event implementation
struct rcl_event_impl_s * impl;
rcl_event_impl_t * impl;
} rcl_event_t;

/// Return a rcl_event_t struct with members set to `NULL`.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/guard_condition.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ typedef struct rcl_guard_condition_s
rcl_context_t * context;

/// Pointer to the guard condition implementation
struct rcl_guard_condition_impl_s * impl;
rcl_guard_condition_impl_t * impl;
} rcl_guard_condition_t;

/// Options available for a rcl guard condition.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/init_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef struct rcl_init_options_impl_s rcl_init_options_impl_t;
typedef struct rcl_init_options_s
{
/// Implementation specific pointer.
struct rcl_init_options_impl_s * impl;
rcl_init_options_impl_t * impl;
} rcl_init_options_t;

/// Return a zero initialized rcl_init_options_t struct.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/lexer_lookahead.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct rcl_lexer_lookahead2_impl_s rcl_lexer_lookahead2_impl_t;
typedef struct rcl_lexer_lookahead2_s
{
/// Pointer to the lexer look ahead2 implementation
struct rcl_lexer_lookahead2_impl_s * impl;
rcl_lexer_lookahead2_impl_t * impl;
} rcl_lexer_lookahead2_t;

/// Get a zero initialized rcl_lexer_lookahead2_t instance.
Expand Down
7 changes: 3 additions & 4 deletions rcl/include/rcl/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ extern "C"
#include "rcl/allocator.h"
#include "rcl/arguments.h"
#include "rcl/context.h"
#include "rcl/guard_condition.h"
#include "rcl/macros.h"
#include "rcl/node_options.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"

struct rcl_guard_condition_s;

typedef struct rcl_node_impl_s rcl_node_impl_t;

/// Structure which encapsulates a ROS Node.
Expand All @@ -43,7 +42,7 @@ typedef struct rcl_node_s
rcl_context_t * context;

/// Private implementation pointer.
struct rcl_node_impl_s * impl;
rcl_node_impl_t * impl;
} rcl_node_t;

/// Return a rcl_node_t struct with members initialized to `NULL`.
Expand Down Expand Up @@ -463,7 +462,7 @@ rcl_node_get_rcl_instance_id(const rcl_node_t * node);
*/
RCL_PUBLIC
RCL_WARN_UNUSED
const struct rcl_guard_condition_s *
const rcl_guard_condition_t *
rcl_node_get_graph_guard_condition(const rcl_node_t * node);

/// Return the logger name of the node.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typedef struct rcl_publisher_impl_s rcl_publisher_impl_t;
typedef struct rcl_publisher_s
{
/// Pointer to the publisher implementation
struct rcl_publisher_impl_s * impl;
rcl_publisher_impl_t * impl;
} rcl_publisher_t;

/// Options available for a rcl publisher.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/remap.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef struct rcl_remap_impl_s rcl_remap_impl_t;
typedef struct rcl_remap_s
{
/// Private implementation pointer.
struct rcl_remap_impl_s * impl;
rcl_remap_impl_t * impl;
} rcl_remap_t;

/// Return a rcl_remap_t struct with members initialized to `NULL`.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/service.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef struct rcl_service_impl_s rcl_service_impl_t;
typedef struct rcl_service_s
{
/// Pointer to the service implementation
struct rcl_service_impl_s * impl;
rcl_service_impl_t * impl;
} rcl_service_t;

/// Options available for a rcl service.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct rcl_subscription_impl_s rcl_subscription_impl_t;
typedef struct rcl_subscription_s
{
/// Pointer to the subscription implementation
struct rcl_subscription_impl_s * impl;
rcl_subscription_impl_t * impl;
} rcl_subscription_t;

/// Options available for a rcl subscription.
Expand Down
4 changes: 1 addition & 3 deletions rcl/include/rcl/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ extern "C"
#include "rcl/types.h"
#include "rmw/rmw.h"

struct rcl_clock_s;

typedef struct rcl_timer_impl_s rcl_timer_impl_t;

/// Structure which encapsulates a ROS Timer.
typedef struct rcl_timer_s
{
/// Private implementation pointer.
struct rcl_timer_impl_s * impl;
rcl_timer_impl_t * impl;
} rcl_timer_t;

/// User callback signature for timers.
Expand Down
2 changes: 1 addition & 1 deletion rcl/include/rcl/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ typedef struct rcl_wait_set_s
/// Number of events
size_t size_of_events;
/// Implementation specific storage.
struct rcl_wait_set_impl_s * impl;
rcl_wait_set_impl_t * impl;
} rcl_wait_set_t;

/// Return a rcl_wait_set_t struct with members set to `NULL`.
Expand Down

0 comments on commit 00b9b48

Please sign in to comment.