mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 08:10:10 +01:00
smart pointer factories should not be static
This commit is contained in:
parent
df6b8820c4
commit
f770bfadc1
2 changed files with 3 additions and 3 deletions
|
|
@ -184,7 +184,7 @@ namespace Hyprutils {
|
|||
};
|
||||
|
||||
template <typename U, typename... Args>
|
||||
static CSharedPointer<U> makeShared(Args&&... args) {
|
||||
[[nodiscard]] inline CSharedPointer<U> makeShared(Args&&... args) {
|
||||
return CSharedPointer<U>(new U(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace Hyprutils {
|
|||
};
|
||||
|
||||
template <typename U, typename... Args>
|
||||
static CUniquePointer<U> makeUnique(Args&&... args) {
|
||||
[[nodiscard]] inline CUniquePointer<U> makeUnique(Args&&... args) {
|
||||
return CUniquePointer<U>(new U(std::forward<Args>(args)...));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue