From a8cb70c0c4e06f740ea3bea17209b1316fcc4693 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Mon, 30 Jan 2023 16:09:51 +0100 Subject: [PATCH] LibGPU: Remove DeprecatedString usage --- Userland/Libraries/LibGPU/Driver.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Userland/Libraries/LibGPU/Driver.cpp b/Userland/Libraries/LibGPU/Driver.cpp index 4927d48a85..4da642f627 100644 --- a/Userland/Libraries/LibGPU/Driver.cpp +++ b/Userland/Libraries/LibGPU/Driver.cpp @@ -1,10 +1,10 @@ /* * Copyright (c) 2022, Stephan Unverwerth + * Copyright (c) 2023, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include @@ -14,15 +14,15 @@ namespace GPU { // FIXME: Think of a better way to configure these paths. Maybe use ConfigServer? // clang-format off -static HashMap const s_driver_path_map +static HashMap const s_driver_path_map { #if defined(AK_OS_SERENITY) - { "softgpu", "libsoftgpu.so.serenity" }, - { "virtgpu", "libvirtgpu.so.serenity" }, + { "softgpu"sv, "libsoftgpu.so.serenity" }, + { "virtgpu"sv, "libvirtgpu.so.serenity" }, #elif defined(AK_OS_MACOS) - { "softgpu", "liblagom-softgpu.dylib" }, + { "softgpu"sv, "liblagom-softgpu.dylib" }, #else - { "softgpu", "liblagom-softgpu.so.0" }, + { "softgpu"sv, "liblagom-softgpu.so.0" }, #endif }; // clang-format on @@ -41,7 +41,7 @@ ErrorOr> Driver::try_create(StringView driver_name) if (it == s_driver_path_map.end()) return Error::from_string_literal("The requested GPU driver was not found in the list of allowed driver libraries"); - auto lib = dlopen(it->value.characters(), RTLD_NOW); + auto lib = dlopen(it->value, RTLD_NOW); if (!lib) return Error::from_string_literal("The library for the requested GPU driver could not be opened");