From b6cbd10e8a64974c1eb5eb4f940121711da889e8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 12 Nov 2022 19:18:13 +0100 Subject: fix warnings --- compat/optional.hpp | 2 +- test/tile-iter.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compat/optional.hpp b/compat/optional.hpp index 9c1f9f6c..6f8a1a89 100644 --- a/compat/optional.hpp +++ b/compat/optional.hpp @@ -6,7 +6,7 @@ namespace std { template struct tuple_size> : std::integral_constant {}; template struct tuple_element<0, Corrade::Containers::Optional> { using type = T; }; template struct tuple_element<1, Corrade::Containers::Optional> { using type = bool; }; -} +} // namespace std namespace Corrade::Containers { diff --git a/test/tile-iter.cpp b/test/tile-iter.cpp index 43ef6bdf..1142969e 100644 --- a/test/tile-iter.cpp +++ b/test/tile-iter.cpp @@ -13,23 +13,22 @@ bool floormat::test_tile_iter() // NOLINT(readability-function-size) if (always_false()) { const chunk c; - for (const auto& [x, k, pt] : c) + for ([[maybe_unused]] const auto& [x, k, pt] : c) static_assert(std::is_same_v); - for (const auto [x, k, pt] : c) + for ([[maybe_unused]] const auto [x, k, pt] : c) static_assert(std::is_same_v); - for (auto [x, k, pt] : c) + for ([[maybe_unused]] auto [x, k, pt] : c) static_assert(std::is_same_v); } if (always_false()) { chunk c; - for (auto [x, k, pt] : c) + for ([[maybe_unused]] auto [x, k, pt] : c) static_assert(std::is_same_v); - for (const auto [x, k, pt] : c) + for ([[maybe_unused]] const auto [x, k, pt] : c) static_assert(std::is_same_v); } return true; } } // namespace floormat - -- cgit v1.2.3