Skip to content

Commit

Permalink
Update trace_node.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
xygyo77 authored Jun 20, 2024
1 parent af553f2 commit 158afa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CARET_trace/src/trace_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,14 @@ bool TraceNode::is_recording_allowed() const
bool TraceNode::is_recording_allowed_init() const
{
return true;
// cppcheck-suppress-next unreachableCode
#if 0 // ignore following
std::shared_lock<std::shared_mutex> lock(mutex_);

// NOTE: Since PREPARE to RECORD is a continuous state transition
// with a return value of TRUE, no mutex is required.
// On the other hand, the transition to the PREPARE state is a boundary, so a mutex is required.
return status_ == TRACE_STATUS::RECORD || status_ == TRACE_STATUS::PREPARE;
#endif
}

const TRACE_STATUS & TraceNode::get_status() const
Expand Down

0 comments on commit 158afa4

Please sign in to comment.