mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:15:08 +00:00
Userland: Don't use String::from_utf8()
for literal strings
This commit is contained in:
parent
4cc3c41269
commit
c74f7e5f2a
8 changed files with 15 additions and 15 deletions
|
@ -87,7 +87,7 @@ ErrorOr<NonnullRefPtr<DeviceNodeFamily>> DeviceEventLoop::find_or_register_new_d
|
|||
|
||||
static ErrorOr<String> build_suffix_with_letters(size_t allocation_index)
|
||||
{
|
||||
auto base_string = TRY(String::from_utf8(""sv));
|
||||
String base_string {};
|
||||
while (true) {
|
||||
base_string = TRY(String::formatted("{:c}{}", 'a' + (allocation_index % 26), base_string));
|
||||
allocation_index = (allocation_index / 26);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue