mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 16:28:06 +03:00
LibCore: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls
This commit is contained in:
parent
2b2e0a4c5a
commit
2ebd79bc76
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/2ebd79bc76 Pull-request: https://github.com/SerenityOS/serenity/pull/19422
@ -14,6 +14,7 @@ namespace Core {
|
||||
|
||||
class SecretString {
|
||||
AK_MAKE_NONCOPYABLE(SecretString);
|
||||
AK_MAKE_DEFAULT_MOVABLE(SecretString);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static ErrorOr<SecretString> take_ownership(char*&, size_t);
|
||||
@ -26,8 +27,6 @@ public:
|
||||
|
||||
SecretString() = default;
|
||||
~SecretString();
|
||||
SecretString(SecretString&&) = default;
|
||||
SecretString& operator=(SecretString&&) = default;
|
||||
|
||||
private:
|
||||
explicit SecretString(ByteBuffer&&);
|
||||
|
@ -237,9 +237,9 @@ ErrorOr<int> poll(Span<struct pollfd>, int timeout);
|
||||
|
||||
class AddressInfoVector {
|
||||
AK_MAKE_NONCOPYABLE(AddressInfoVector);
|
||||
AK_MAKE_DEFAULT_MOVABLE(AddressInfoVector);
|
||||
|
||||
public:
|
||||
AddressInfoVector(AddressInfoVector&&) = default;
|
||||
~AddressInfoVector() = default;
|
||||
|
||||
ReadonlySpan<struct addrinfo> addresses() const { return m_addresses; }
|
||||
|
@ -18,6 +18,7 @@ namespace Core {
|
||||
struct ThreadEventQueue::Private {
|
||||
struct QueuedEvent {
|
||||
AK_MAKE_NONCOPYABLE(QueuedEvent);
|
||||
AK_MAKE_DEFAULT_MOVABLE(QueuedEvent);
|
||||
|
||||
public:
|
||||
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;
|
||||
|
||||
WeakPtr<Object> receiver;
|
||||
|
Loading…
Reference in New Issue
Block a user