From 83e66bb7fc494808176ef48c1bfcd1e7fe7220bd Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Tue, 5 May 2020 07:39:09 -0400 Subject: [PATCH] Suppress some localized-compare warnings --- src/cata_variant.h | 2 +- src/flat_set.h | 2 ++ tools/clang-tidy-plugin/UsePointArithmeticCheck.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cata_variant.h b/src/cata_variant.h index e5f63f1a38184..58d7878b07e9b 100644 --- a/src/cata_variant.h +++ b/src/cata_variant.h @@ -324,7 +324,7 @@ class cata_variant } CATA_VARIANT_OPERATOR( == ); CATA_VARIANT_OPERATOR( != ); - CATA_VARIANT_OPERATOR( < ); + CATA_VARIANT_OPERATOR( < ); // NOLINT( cata-use-localized-sorting ) CATA_VARIANT_OPERATOR( <= ); CATA_VARIANT_OPERATOR( > ); CATA_VARIANT_OPERATOR( >= ); diff --git a/src/flat_set.h b/src/flat_set.h index 33a593dc99ef4..dadc37fabfb77 100644 --- a/src/flat_set.h +++ b/src/flat_set.h @@ -13,7 +13,9 @@ struct transparent_less_than { template constexpr auto operator()( T &&lhs, U &&rhs ) const noexcept + // NOLINTNEXTLINE(cata-use-localized-sorting) -> decltype( std::forward( lhs ) < std::forward( rhs ) ) { + // NOLINTNEXTLINE(cata-use-localized-sorting) return std::forward( lhs ) < std::forward( rhs ); } }; diff --git a/tools/clang-tidy-plugin/UsePointArithmeticCheck.cpp b/tools/clang-tidy-plugin/UsePointArithmeticCheck.cpp index ba1ad0696ed7d..452d47a32cec8 100644 --- a/tools/clang-tidy-plugin/UsePointArithmeticCheck.cpp +++ b/tools/clang-tidy-plugin/UsePointArithmeticCheck.cpp @@ -127,6 +127,7 @@ struct ExpressionComponent { static bool operator<( const ExpressionComponent &l, const ExpressionComponent &r ) { + // NOLINTNEXTLINE(cata-use-localized-sorting) return l.sortKey() < r.sortKey(); }