diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 19:18:13 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 19:19:55 +0100 |
commit | b6cbd10e8a64974c1eb5eb4f940121711da889e8 (patch) | |
tree | da33d0b9a68d679d0817229ac526b34a4c9b050a | |
parent | 26886d1a0bc3bc19f1da706edb8640a89d5121da (diff) |
fix warnings
-rw-r--r-- | compat/optional.hpp | 2 | ||||
-rw-r--r-- | 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<class T> struct tuple_size<Corrade::Containers::Optional<T>> : std::integral_constant<std::size_t, 2> {}; template<class T> struct tuple_element<0, Corrade::Containers::Optional<T>> { using type = T; }; template<class T> struct tuple_element<1, Corrade::Containers::Optional<T>> { 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<decltype(x), const tile_proto>); - for (const auto [x, k, pt] : c) + for ([[maybe_unused]] const auto [x, k, pt] : c) static_assert(std::is_same_v<decltype(x), const tile_proto>); - for (auto [x, k, pt] : c) + for ([[maybe_unused]] auto [x, k, pt] : c) static_assert(std::is_same_v<decltype(x), tile_proto>); } 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<decltype(x), tile_ref>); - for (const auto [x, k, pt] : c) + for ([[maybe_unused]] const auto [x, k, pt] : c) static_assert(std::is_same_v<decltype(x), const tile_ref>); } return true; } } // namespace floormat - |