mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 09:48:56 +00:00
LibGfx: Add FlagRole to GUI::Variant
This commit is contained in:
parent
d68268f791
commit
f22043a225
Notes:
sideshowbarker
2024-07-18 01:28:19 +09:00
Author: https://github.com/AtkinsSJ
Commit: f22043a225
Pull-request: https://github.com/SerenityOS/serenity/pull/10750
Reviewed-by: https://github.com/BenWiederhake ✅
3 changed files with 43 additions and 0 deletions
|
@ -147,6 +147,22 @@ enum class FlagRole {
|
|||
__Count,
|
||||
};
|
||||
|
||||
inline const char* to_string(FlagRole role)
|
||||
{
|
||||
switch (role) {
|
||||
case FlagRole::NoRole:
|
||||
return "NoRole";
|
||||
#undef __ENUMERATE_FLAG_ROLE
|
||||
#define __ENUMERATE_FLAG_ROLE(role) \
|
||||
case FlagRole::role: \
|
||||
return #role;
|
||||
ENUMERATE_FLAG_ROLES(__ENUMERATE_FLAG_ROLE)
|
||||
#undef __ENUMERATE_FLAG_ROLE
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
enum class MetricRole {
|
||||
NoRole,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue