Avoid a gcc warning in enum option_to_string impl
This commit is contained in:
parent
b0e12f2bcb
commit
92b56cbda0
|
@ -43,8 +43,10 @@ EnableIfWithoutBitOps<Enum, String> option_to_string(Enum e)
|
|||
{
|
||||
constexpr auto desc = enum_desc(Enum{});
|
||||
auto it = find_if(desc, [e](const EnumDesc<Enum>& d) { return d.value == e; });
|
||||
kak_assert(it != desc.end());
|
||||
return it->name.str();
|
||||
if (it != desc.end())
|
||||
return it->name.str();
|
||||
kak_assert(false);
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename Flags, typename = decltype(enum_desc(Flags{}))>
|
||||
|
|
Loading…
Reference in New Issue
Block a user