diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-04 18:02:33 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:54:33 +0100 |
commit | 6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch) | |
tree | 372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Libraries/LibC/termcap.cpp | |
parent | f74251606d74b504a1379ebb893fdb5529054ea5 (diff) | |
download | serenity-6e19ab2bbce0b113b628e6f8e9b5c0640053933e.zip |
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
Diffstat (limited to 'Userland/Libraries/LibC/termcap.cpp')
-rw-r--r-- | Userland/Libraries/LibC/termcap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibC/termcap.cpp b/Userland/Libraries/LibC/termcap.cpp index 171b440eb7..210e5d167f 100644 --- a/Userland/Libraries/LibC/termcap.cpp +++ b/Userland/Libraries/LibC/termcap.cpp @@ -5,8 +5,8 @@ */ #include <AK/Debug.h> +#include <AK/DeprecatedString.h> #include <AK/HashMap.h> -#include <AK/String.h> #include <AK/Vector.h> #include <assert.h> #include <string.h> @@ -27,13 +27,13 @@ int __attribute__((weak)) tgetent([[maybe_unused]] char* bp, [[maybe_unused]] ch return 1; } -static HashMap<String, char const*>* caps = nullptr; +static HashMap<DeprecatedString, char const*>* caps = nullptr; static void ensure_caps() { if (caps) return; - caps = new HashMap<String, char const*>; + caps = new HashMap<DeprecatedString, char const*>; caps->set("DC", "\033[%p1%dP"); caps->set("IC", "\033[%p1%d@"); caps->set("ce", "\033[K"); @@ -114,7 +114,7 @@ int __attribute__((weak)) tgetnum(char const* id) static Vector<char> s_tgoto_buffer; char* __attribute__((weak)) tgoto([[maybe_unused]] char const* cap, [[maybe_unused]] int col, [[maybe_unused]] int row) { - auto cap_str = StringView { cap, strlen(cap) }.replace("%p1%d"sv, String::number(col), ReplaceMode::FirstOnly).replace("%p2%d"sv, String::number(row), ReplaceMode::FirstOnly); + auto cap_str = StringView { cap, strlen(cap) }.replace("%p1%d"sv, DeprecatedString::number(col), ReplaceMode::FirstOnly).replace("%p2%d"sv, DeprecatedString::number(row), ReplaceMode::FirstOnly); s_tgoto_buffer.clear_with_capacity(); s_tgoto_buffer.ensure_capacity(cap_str.length()); |