1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

add aliases test

This commit is contained in:
neargye 2022-08-13 17:44:42 +04:00
parent e6ce44337a
commit b5116d078d
3 changed files with 146 additions and 7 deletions

View file

@ -246,12 +246,12 @@ constexpr string_view pretty_name(string_view name) noexcept {
}
}
if (name.size() > 0 && ((name.front() >= 'a' && name.front() <= 'z') ||
(name.front() >= 'A' && name.front() <= 'Z') ||
if (name.size() > 0 && ((name[0] >= 'a' && name[0] <= 'z') ||
(name[0] >= 'A' && name[0] <= 'Z') ||
#if defined(MAGIC_ENUM_ENABLE_NONASCII)
(name.front() & 0x80) ||
(name[0]) & 0x80) ||
#endif
(name.front() == '_'))) {
(name[0] == '_'))) {
return name;
}
@ -293,7 +293,7 @@ constexpr std::size_t find(string_view str, char c) noexcept {
return string_view::npos;
} else {
return str.find_first_of(c);
return str.find(c);
}
}