diff --git a/.clang-tidy b/.clang-tidy index 5e08046a3e3a1..9a39d0d2384b2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -26,7 +26,6 @@ readability-*,\ -bugprone-undefined-memory-manipulation,\ -bugprone-unused-return-value,\ -bugprone-use-after-move,\ --cert-dcl03-c,\ -cert-dcl16-c,\ -cert-dcl21-cpp,\ -cert-dcl50-cpp,\ @@ -42,7 +41,6 @@ readability-*,\ -misc-definitions-in-headers,\ -misc-non-private-member-variables-in-classes,\ -misc-redundant-expression,\ --misc-static-assert,\ -misc-unconventional-assign-operator,\ -modernize-avoid-c-arrays,\ -modernize-deprecated-headers,\ diff --git a/src/advanced_inv.cpp b/src/advanced_inv.cpp index c26211e8ab9d1..f20c849f1d1eb 100644 --- a/src/advanced_inv.cpp +++ b/src/advanced_inv.cpp @@ -2049,9 +2049,9 @@ bool advanced_inventory::query_destination( aim_location &def ) menu.pad_left = 9; /* free space for advanced_inventory::menu_square */ { - // the direction locations should be contiguous in the enum std::vector ordered_locs; - assert( AIM_NORTHEAST - AIM_SOUTHWEST == 8 ); + static_assert( AIM_NORTHEAST - AIM_SOUTHWEST == 8, + "Expected 9 contiguous directions in the aim_location enum" ); for( int i = AIM_SOUTHWEST; i <= AIM_NORTHEAST; i++ ) { ordered_locs.push_back( screen_relative_location( static_cast ( i ) ) ); }