mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 07:00:10 +01:00
defaulting default ctors is more readable and considered best practice instead of providing a default implementation
This commit is contained in:
parent
f770bfadc1
commit
e54adc4394
4 changed files with 5 additions and 15 deletions
|
|
@ -83,9 +83,7 @@ namespace Hyprutils::Memory {
|
|||
std::swap(m_ptr, ref.m_ptr);
|
||||
}
|
||||
|
||||
CAtomicSharedPointer() noexcept {
|
||||
; // empty
|
||||
}
|
||||
CAtomicSharedPointer() noexcept = default;
|
||||
|
||||
CAtomicSharedPointer(std::nullptr_t) noexcept {
|
||||
; // empty
|
||||
|
|
@ -262,9 +260,7 @@ namespace Hyprutils::Memory {
|
|||
m_ptr = ref.m_ptr;
|
||||
}
|
||||
|
||||
CAtomicWeakPointer() noexcept {
|
||||
; // empty
|
||||
}
|
||||
CAtomicWeakPointer() noexcept = default;
|
||||
|
||||
CAtomicWeakPointer(std::nullptr_t) noexcept {
|
||||
; // empty
|
||||
|
|
|
|||
|
|
@ -61,9 +61,7 @@ namespace Hyprutils {
|
|||
}
|
||||
|
||||
/* creates an empty shared pointer with no implementation */
|
||||
CSharedPointer() noexcept {
|
||||
; // empty
|
||||
}
|
||||
CSharedPointer() noexcept = default;
|
||||
|
||||
/* creates an empty shared pointer with no implementation */
|
||||
CSharedPointer(std::nullptr_t) noexcept {
|
||||
|
|
|
|||
|
|
@ -42,9 +42,7 @@ namespace Hyprutils {
|
|||
}
|
||||
|
||||
/* creates an empty unique pointer with no implementation */
|
||||
CUniquePointer() noexcept {
|
||||
; // empty
|
||||
}
|
||||
CUniquePointer() noexcept = default;
|
||||
|
||||
/* creates an empty unique pointer with no implementation */
|
||||
CUniquePointer(std::nullptr_t) noexcept {
|
||||
|
|
|
|||
|
|
@ -102,9 +102,7 @@ namespace Hyprutils {
|
|||
}
|
||||
|
||||
/* create an empty weak ptr */
|
||||
CWeakPointer() {
|
||||
;
|
||||
}
|
||||
CWeakPointer() noexcept = default;
|
||||
|
||||
~CWeakPointer() {
|
||||
decrementWeak();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue