diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-02 12:00:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-02 18:00:13 +0200 |
commit | 87ff76bd57046ef9fb287c68b740fee6c601621a (patch) | |
tree | 787d5b7efe3eed71c939f0c68e7815b4bef2b764 | |
parent | fe0ae3161a6c19d4098d4e8cfe207503b97c359e (diff) | |
download | serenity-87ff76bd57046ef9fb287c68b740fee6c601621a.zip |
Kernel: Make KString non-copyable and non-movable
The user is supposed to hold these in an OwnPtr but bad things would
happen if the user takes these out of the OwnPtr so let's make the
class non-copyable and non-movable.
-rw-r--r-- | Kernel/KString.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/KString.h b/Kernel/KString.h index fcb88eeb81..7dc545e480 100644 --- a/Kernel/KString.h +++ b/Kernel/KString.h @@ -12,6 +12,9 @@ namespace Kernel { class KString { + AK_MAKE_NONCOPYABLE(KString); + AK_MAKE_NONMOVABLE(KString); + public: static OwnPtr<KString> try_create_uninitialized(size_t, char*&); static NonnullOwnPtr<KString> must_create_uninitialized(size_t, char*&); |