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

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 :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -6,8 +6,8 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/Error.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <grp.h>
@ -22,17 +22,17 @@ public:
static ErrorOr<Vector<Group>> all();
Group() = default;
Group(String name, gid_t id = 0, Vector<String> members = {});
Group(DeprecatedString name, gid_t id = 0, Vector<DeprecatedString> members = {});
~Group() = default;
String const& name() const { return m_name; }
void set_name(String const& name) { m_name = name; }
DeprecatedString const& name() const { return m_name; }
void set_name(DeprecatedString const& name) { m_name = name; }
gid_t id() const { return m_id; }
void set_group_id(gid_t const id) { m_id = id; }
Vector<String>& members() { return m_members; }
Vector<DeprecatedString>& members() { return m_members; }
ErrorOr<void> sync();
@ -41,11 +41,11 @@ private:
static ErrorOr<bool> id_exists(gid_t id);
ErrorOr<struct group> to_libc_group();
ErrorOr<String> generate_group_file() const;
ErrorOr<DeprecatedString> generate_group_file() const;
String m_name;
DeprecatedString m_name;
gid_t m_id { 0 };
Vector<String> m_members;
Vector<DeprecatedString> m_members;
};
}