mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
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.
This commit is contained in:
parent
fe0ae3161a
commit
87ff76bd57
1 changed files with 3 additions and 0 deletions
|
@ -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*&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue