Skip to content

Commit 2951481

Browse files
committed
clang-tidy exceptions
1 parent 88d7c4f commit 2951481

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/libcyphal/presentation/presentation.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ class Presentation final : private detail::IPresentationDelegate // NOSONAR cpp
690690
// So, it implicitly updates the `unreferenced_nodes_` list.
691691
while (unreferenced_nodes_.next_node != &unreferenced_nodes_)
692692
{
693+
// Downcast is safe here b/c every `UnRefNode` instance is always a `SharedObject` one.
694+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
693695
auto* const shared_obj = static_cast<detail::SharedObject*>(unreferenced_nodes_.next_node);
694696
shared_obj->destroy();
695697
}

include/libcyphal/presentation/shared_object.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ struct UnRefNode
6060
}
6161
}
6262

63+
// No Lint b/c this `UnRefNode` is a simple helper struct as base of the below `SharedObject`.
64+
// It's under `detail` namespace and not supposed to be used directly by the users of the library.
65+
// NOLINTBEGIN(misc-non-private-member-variables-in-classes)
6366
UnRefNode* prev_node{nullptr};
6467
UnRefNode* next_node{nullptr};
68+
// NOLINTEND(misc-non-private-member-variables-in-classes)
6569

6670
}; // UnRefNode
6771

0 commit comments

Comments
 (0)