mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
AK: Use Noncopyable.h
in Badge
This commit is contained in:
parent
cca84aa28d
commit
501a7dbaa3
Notes:
github-actions[bot]
2024-12-04 16:47:42 +00:00
Author: https://github.com/yyny Commit: https://github.com/LadybirdBrowser/ladybird/commit/501a7dbaa35 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2454 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 4 additions and 6 deletions
10
AK/Badge.h
10
AK/Badge.h
|
@ -6,24 +6,22 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/Noncopyable.h>
|
||||||
#include <AK/Platform.h>
|
#include <AK/Platform.h>
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Badge {
|
class Badge {
|
||||||
|
AK_MAKE_NONCOPYABLE(Badge);
|
||||||
|
AK_MAKE_NONMOVABLE(Badge);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using Type = T;
|
using Type = T;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend T;
|
friend T;
|
||||||
constexpr Badge() = default;
|
constexpr Badge() = default;
|
||||||
|
|
||||||
Badge(Badge const&) = delete;
|
|
||||||
Badge& operator=(Badge const&) = delete;
|
|
||||||
|
|
||||||
Badge(Badge&&) = delete;
|
|
||||||
Badge& operator=(Badge&&) = delete;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue