Skip to content

Commit

Permalink
Remove deprecated Sonar cpp:S1448 (#18)
Browse files Browse the repository at this point in the history
* Remove deprecated Sonar cpp:S1448

* Remove deprecated Sonar cpp:S1448
  • Loading branch information
serges147 authored Dec 9, 2024
1 parent 9579dd9 commit 33c6471
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
Expand Down Expand Up @@ -73,7 +73,7 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 10000 # Raised intentionally because it hurts readability
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortIncludes: Never
SortUsingDeclarations: false
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
Expand All @@ -90,7 +90,7 @@ SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: c++14
TabWidth: 8
UseTab: Never
...
10 changes: 4 additions & 6 deletions c++/cavl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ class Tree;
/// The size of this type is 4x pointer size (16 bytes on a 32-bit platform).
///
/// No Sonar cpp:S1448 b/c this is the main node entity without public members - maintainability is not a concern here.
/// No Sonar cpp:S4963 b/c `Node` supports move operation.
///
template <typename Derived>
class Node // NOSONAR cpp:S1448 cpp:S4963
class Node // NOSONAR cpp:S1448
{
// Polyfill for C++17's std::invoke_result_t.
template <typename F, typename... Args>
Expand Down Expand Up @@ -747,7 +746,7 @@ class Tree final // NOSONAR cpp:S3624
{
public:
/// Helper alias of the compatible node type.
using NodeType = ::cavl::Node<Derived>;
using NodeType = Node<Derived>;
using DerivedType = Derived;

Tree() = default;
Expand Down Expand Up @@ -896,8 +895,7 @@ class Tree final // NOSONAR cpp:S3624
/// the same call stack) we may occasionally fail to detect a bona fide case of a race condition, but this is
/// acceptable because the purpose of this feature is to provide a mere best-effort data race detection.
///
/// No Sonar cpp:S4963 b/c of the RAII pattern.
class TraversalIndicatorUpdater final // NOSONAR cpp:S4963
class TraversalIndicatorUpdater final
{
public:
explicit TraversalIndicatorUpdater(const Tree& sup) noexcept : that(sup) { that.traversal_in_progress_ = true; }
Expand All @@ -923,7 +921,7 @@ class Tree final // NOSONAR cpp:S3624
// including the root node whos `up` points to this origin node (see `isRoot` method).
Node<Derived> origin_node_{};

// No Sonar cpp:S4963 b/c of implicit modification by the `TraversalIndicatorUpdater` RAII class,
// No Sonar cpp:S3687 b/c of implicit modification by the `TraversalIndicatorUpdater` RAII class,
// even for `const` instance of the `Tree` class (hence the `mutable volatile` keywords).
mutable volatile bool traversal_in_progress_ = false; // NOSONAR cpp:S3687
};
Expand Down

0 comments on commit 33c6471

Please sign in to comment.