Skip to content

Commit

Permalink
special duplicate check removal using static variables (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
miyakoshi-dev committed May 14, 2024
1 parent 26e0b9b commit 76c6c87
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions CARET_trace/src/hooked_trace_points.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,6 @@ void SYMBOL_CONCAT_3(
data_container.assign_add_callback_group(record);
}

static KeysSet<void *, void *, void *> recorded_args;

auto group_addr_ = const_cast<void *>(group_addr);
auto node_addr_ = const_cast<void *>(node_addr);

Expand All @@ -495,11 +493,8 @@ void SYMBOL_CONCAT_3(
auto node_handle = static_cast<const void *>(node_ptr->get_rcl_node_handle());
data_container.store_add_callback_group(
obj, group_addr, group_type_name.c_str(), node_handle, now);
if (!recorded_args.has(obj, group_addr_, node_addr_)) {
recorded_args.insert(obj, group_addr_, node_addr_);

record(obj, group_addr, group_type_name.c_str(), node_handle, now);
}
record(obj, group_addr, group_type_name.c_str(), node_handle, now);
}

bool SYMBOL_CONCAT_3(
Expand Down

0 comments on commit 76c6c87

Please sign in to comment.