Skip to content

Commit 2fcf6b7

Browse files
committed
fix: removed some cppcheck-suppress usages
1 parent 3dcfa71 commit 2fcf6b7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

libbenbot/src/engine/Engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void Engine::set_pretty_printing(const bool shouldPrettyPrint)
8989
[this](const Move move) { return pretty_print_move(move); }));
9090
} else {
9191
searcher.context.set_callbacks(search::Callbacks::make_uci_printer(
92-
[this] noexcept { // cppcheck-suppress syntaxError
92+
[this]() noexcept {
9393
return debugMode.load(memory_order_relaxed);
9494
}));
9595
}

libchess/include/libchess/moves/MoveGen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ namespace detail {
198198
[[nodiscard, gnu::const]] constexpr auto get_pawn_double_pushes(
199199
const Position& position, const Bitboard allOccupied)
200200
{
201-
static constexpr auto pawnStartingRank = Side == Color::White ? Rank::Two : Rank::Seven; // cppcheck-suppress knownConditionTrueFalse
201+
static constexpr auto pawnStartingRank = Side == Color::White ? Rank::Two : Rank::Seven;
202202

203203
const auto pushes = pseudo_legal::pawn_double_pushes<Side>(
204204
position.pieces_for<Side>().pawns,

libchess/include/libchess/moves/PseudoLegal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ constexpr auto pawn_double_pushes(
138138
const auto moves = patterns::pawn_double_pushes<Side>(startingPawns) & occupiedSquares.inverse();
139139

140140
// Need to filter out any pushes that would jump over a piece on the third/sixth rank
141-
static constexpr auto rankMask = Side == Color::White ? ranks::THREE : ranks::SIX; // cppcheck-suppress knownConditionTrueFalse
141+
static constexpr auto rankMask = Side == Color::White ? ranks::THREE : ranks::SIX;
142142

143143
const auto fileMask = board::fills::file(occupiedSquares & rankMask);
144144

libchess/src/notation/PGN.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ namespace {
460460
// write extra metadata tags not part of seven tag roster
461461
auto otherTags = metadata
462462
| std::views::filter([](const auto& it) {
463-
return not std::ranges::contains(sevenTagRoster, it.first); // cppcheck-suppress internalAstError
463+
return not std::ranges::contains(sevenTagRoster, it.first);
464464
});
465465

466466
for (const auto& [key, value] : otherTags) {

0 commit comments

Comments
 (0)