1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

Kernel: Make a bunch of "char const* to_string()" return StringView

This commit is contained in:
Andreas Kling 2021-08-05 20:41:44 +02:00
parent f35108fc31
commit af46f2214c
4 changed files with 34 additions and 33 deletions

View file

@ -51,17 +51,17 @@ public:
Connecting
};
static const char* to_string(SetupState setup_state)
static StringView to_string(SetupState setup_state)
{
switch (setup_state) {
case SetupState::Unstarted:
return "Unstarted";
return "Unstarted"sv;
case SetupState::InProgress:
return "InProgress";
return "InProgress"sv;
case SetupState::Completed:
return "Completed";
return "Completed"sv;
default:
return "None";
return "None"sv;
}
}