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{});
|
constexpr auto desc = enum_desc(Enum{});
|
||||||
auto it = find_if(desc, [e](const EnumDesc<Enum>& d) { return d.value == e; });
|
auto it = find_if(desc, [e](const EnumDesc<Enum>& d) { return d.value == e; });
|
||||||
kak_assert(it != desc.end());
|
if (it != desc.end())
|
||||||
return it->name.str();
|
return it->name.str();
|
||||||
|
kak_assert(false);
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Flags, typename = decltype(enum_desc(Flags{}))>
|
template<typename Flags, typename = decltype(enum_desc(Flags{}))>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user