summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2023-01-30 16:09:51 +0100
committerTim Flynn <trflynn89@pm.me>2023-01-30 13:49:52 -0500
commita8cb70c0c4e06f740ea3bea17209b1316fcc4693 (patch)
tree7cc517daa70defbbb65a656799bfa28abb3c0b79
parente3f8ac2c05423da784e2925b358d2df859414db2 (diff)
downloadserenity-a8cb70c0c4e06f740ea3bea17209b1316fcc4693.zip
LibGPU: Remove DeprecatedString usage
-rw-r--r--Userland/Libraries/LibGPU/Driver.cpp14
1 files 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 <s.unverwerth@serenityos.org>
+ * Copyright (c) 2023, Jelle Raaijmakers <jelle@gmta.nl>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <AK/DeprecatedString.h>
#include <AK/HashMap.h>
#include <AK/WeakPtr.h>
#include <LibGPU/Driver.h>
@@ -14,15 +14,15 @@ namespace GPU {
// FIXME: Think of a better way to configure these paths. Maybe use ConfigServer?
// clang-format off
-static HashMap<DeprecatedString, DeprecatedString> const s_driver_path_map
+static HashMap<StringView, char const*> 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<NonnullRefPtr<Driver>> 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");