Skip to content

Commit

Permalink
fix issue 398 #verification #sonar #docs
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Nov 29, 2024
1 parent ade0d04 commit 215b27c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions include/libcyphal/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace libcyphal

/// @brief Defines an abstract interface for a callback executor.
///
class IExecutor : public ITimeProvider
class IExecutor : public cetl::rtti::rtti, public ITimeProvider
{
// EBAF7312-5CFE-45F5-89FF-D9B9FE45F8EB
// clang-format off
Expand Down Expand Up @@ -105,7 +105,7 @@ class IExecutor : public ITimeProvider
///
static constexpr std::size_t MaxSize = (sizeof(void*) * 16) + sizeof(Function);

class Interface
class Interface : public rtti
{
// 5E16E6BC-C7EB-42EC-8A98-06189C2F0349
// clang-format off
Expand Down Expand Up @@ -139,13 +139,13 @@ class IExecutor : public ITimeProvider
}

// No Sonar `cpp:S5008` and `cpp:S5356` b/c they are unavoidable - RTTI integration.
CETL_NODISCARD void* _cast_(const cetl::type_id& id) & noexcept // NOSONAR cpp:S5008
CETL_NODISCARD void* _cast_(const cetl::type_id& id) & noexcept override // NOSONAR cpp:S5008
{
return (id == _get_type_id_()) ? this : nullptr; // NOSONAR cpp:S5356
}

// No Sonar `cpp:S5008` and `cpp:S5356` b/c they are unavoidable - RTTI integration.
CETL_NODISCARD const void* _cast_(const cetl::type_id& id) const& noexcept // NOSONAR cpp:S5008
CETL_NODISCARD const void* _cast_(const cetl::type_id& id) const& noexcept override // NOSONAR cpp:S5008
{
return (id == _get_type_id_()) ? this : nullptr; // NOSONAR cpp:S5356
}
Expand Down Expand Up @@ -240,13 +240,13 @@ class IExecutor : public ITimeProvider
}

// No Sonar `cpp:S5008` and `cpp:S5356` b/c they are unavoidable - RTTI integration.
CETL_NODISCARD virtual void* _cast_(const cetl::type_id& id) & noexcept // NOSONAR cpp:S5008
CETL_NODISCARD void* _cast_(const cetl::type_id& id) & noexcept override // NOSONAR cpp:S5008
{
return (id == _get_type_id_()) ? this : nullptr; // NOSONAR cpp:S5356
}

// No Sonar `cpp:S5008` and `cpp:S5356` b/c they are unavoidable - RTTI integration.
CETL_NODISCARD virtual const void* _cast_(const cetl::type_id& id) const& noexcept // NOSONAR cpp:S5008
CETL_NODISCARD const void* _cast_(const cetl::type_id& id) const& noexcept override // NOSONAR cpp:S5008
{
return (id == _get_type_id_()) ? this : nullptr; // NOSONAR cpp:S5356
}
Expand Down
6 changes: 3 additions & 3 deletions include/libcyphal/transport/scattered_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ScatteredBuffer final // NOSONAR : cpp:S4963 - we do directly handle reso
///
/// @see ScatteredBuffer::ScatteredBuffer(AnyStorage&& any_storage)
///
class IStorage
class IStorage : public cetl::rtti::rtti
{
// 91C1B109-F90E-45BE-95CF-6ED02AC3FFAA
// clang-format off
Expand Down Expand Up @@ -78,13 +78,13 @@ class ScatteredBuffer final // NOSONAR : cpp:S4963 - we do directly handle reso
}

// No Sonar `cpp:S5008` and `cpp:S5356` b/c they are unavoidable - RTTI integration.
CETL_NODISCARD void* _cast_(const cetl::type_id& id) & noexcept // NOSONAR cpp:S5008
CETL_NODISCARD void* _cast_(const cetl::type_id& id) & noexcept override // NOSONAR cpp:S5008
{
return (id == _get_type_id_()) ? this : nullptr; // NOSONAR cpp:S5356
}

// No Sonar `cpp:S5008` and `cpp:S5356` b/c they are unavoidable - RTTI integration.
CETL_NODISCARD const void* _cast_(const cetl::type_id& id) const& noexcept // NOSONAR cpp:S5008
CETL_NODISCARD const void* _cast_(const cetl::type_id& id) const& noexcept override // NOSONAR cpp:S5008
{
return (id == _get_type_id_()) ? this : nullptr; // NOSONAR cpp:S5356
}
Expand Down

0 comments on commit 215b27c

Please sign in to comment.