Simplify ASSERT_SORT_ORDER

In practice this only looked at the name property, so we can simplify it
by using an ordinary template function instead of a macro.
This commit is contained in:
ridiculousfish
2021-07-15 13:15:24 -07:00
parent a638c4f01d
commit f345464879
6 changed files with 28 additions and 19 deletions

View File

@@ -165,7 +165,7 @@ static constexpr const input_function_metadata_t input_function_metadata[] = {
{L"yank-pop", readline_cmd_t::yank_pop},
};
ASSERT_SORT_ORDER(input_function_metadata, .name);
ASSERT_SORTED_BY_NAME(input_function_metadata);
static_assert(sizeof(input_function_metadata) / sizeof(input_function_metadata[0]) ==
input_function_count,
"input_function_metadata size mismatch with input_common. Did you forget to update "