mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 20:17:41 +00:00
LibCore: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls
This commit is contained in:
parent
2b2e0a4c5a
commit
2ebd79bc76
3 changed files with 3 additions and 9 deletions
|
@ -14,6 +14,7 @@ namespace Core {
|
||||||
|
|
||||||
class SecretString {
|
class SecretString {
|
||||||
AK_MAKE_NONCOPYABLE(SecretString);
|
AK_MAKE_NONCOPYABLE(SecretString);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(SecretString);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static ErrorOr<SecretString> take_ownership(char*&, size_t);
|
[[nodiscard]] static ErrorOr<SecretString> take_ownership(char*&, size_t);
|
||||||
|
@ -26,8 +27,6 @@ public:
|
||||||
|
|
||||||
SecretString() = default;
|
SecretString() = default;
|
||||||
~SecretString();
|
~SecretString();
|
||||||
SecretString(SecretString&&) = default;
|
|
||||||
SecretString& operator=(SecretString&&) = default;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit SecretString(ByteBuffer&&);
|
explicit SecretString(ByteBuffer&&);
|
||||||
|
|
|
@ -237,9 +237,9 @@ ErrorOr<int> poll(Span<struct pollfd>, int timeout);
|
||||||
|
|
||||||
class AddressInfoVector {
|
class AddressInfoVector {
|
||||||
AK_MAKE_NONCOPYABLE(AddressInfoVector);
|
AK_MAKE_NONCOPYABLE(AddressInfoVector);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(AddressInfoVector);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AddressInfoVector(AddressInfoVector&&) = default;
|
|
||||||
~AddressInfoVector() = default;
|
~AddressInfoVector() = default;
|
||||||
|
|
||||||
ReadonlySpan<struct addrinfo> addresses() const { return m_addresses; }
|
ReadonlySpan<struct addrinfo> addresses() const { return m_addresses; }
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace Core {
|
||||||
struct ThreadEventQueue::Private {
|
struct ThreadEventQueue::Private {
|
||||||
struct QueuedEvent {
|
struct QueuedEvent {
|
||||||
AK_MAKE_NONCOPYABLE(QueuedEvent);
|
AK_MAKE_NONCOPYABLE(QueuedEvent);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(QueuedEvent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QueuedEvent(Object& receiver, NonnullOwnPtr<Event> event)
|
QueuedEvent(Object& receiver, NonnullOwnPtr<Event> event)
|
||||||
|
@ -26,12 +27,6 @@ struct ThreadEventQueue::Private {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QueuedEvent(QueuedEvent&& other)
|
|
||||||
: receiver(other.receiver)
|
|
||||||
, event(move(other.event))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
~QueuedEvent() = default;
|
~QueuedEvent() = default;
|
||||||
|
|
||||||
WeakPtr<Object> receiver;
|
WeakPtr<Object> receiver;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue