Skip to content

Commit 1449bab

Browse files
default move construct to thread head_guard
1 parent 525fdc1 commit 1449bab

3 files changed

Lines changed: 3 additions & 15 deletions

File tree

include/fast_io_hosted/threads/thread/c_malloc_guard.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ class thread_start_routine_tuple_c_malloc_allocate_guard
1313
{}
1414

1515
constexpr thread_start_routine_tuple_c_malloc_allocate_guard(thread_start_routine_tuple_c_malloc_allocate_guard const &) noexcept = delete;
16-
constexpr thread_start_routine_tuple_c_malloc_allocate_guard(thread_start_routine_tuple_c_malloc_allocate_guard &&other) noexcept
17-
: ptr_{other.ptr_}
18-
{
19-
other.ptr_ = nullptr;
20-
}
16+
constexpr thread_start_routine_tuple_c_malloc_allocate_guard(thread_start_routine_tuple_c_malloc_allocate_guard &&other) noexcept = default;
2117

2218
constexpr ~thread_start_routine_tuple_c_malloc_allocate_guard()
2319
{

include/fast_io_hosted/threads/thread/nt.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ class nt_thread_start_routine_tuple_allocate_guard
2626
{}
2727

2828
constexpr nt_thread_start_routine_tuple_allocate_guard(nt_thread_start_routine_tuple_allocate_guard const &) noexcept = delete;
29-
constexpr nt_thread_start_routine_tuple_allocate_guard(nt_thread_start_routine_tuple_allocate_guard &&other) noexcept
30-
: ptr_{other.ptr_}
31-
{
32-
other.ptr_ = nullptr;
33-
}
29+
constexpr nt_thread_start_routine_tuple_allocate_guard(nt_thread_start_routine_tuple_allocate_guard &&other) noexcept = default;
3430

3531
constexpr ~nt_thread_start_routine_tuple_allocate_guard()
3632
{

include/fast_io_hosted/threads/thread/win32.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ class win32_thread_start_routine_tuple_allocate_guard
2626
{}
2727

2828
constexpr win32_thread_start_routine_tuple_allocate_guard(win32_thread_start_routine_tuple_allocate_guard const &) noexcept = delete;
29-
constexpr win32_thread_start_routine_tuple_allocate_guard(win32_thread_start_routine_tuple_allocate_guard &&other) noexcept
30-
: ptr_{other.ptr_}
31-
{
32-
other.ptr_ = nullptr;
33-
}
29+
constexpr win32_thread_start_routine_tuple_allocate_guard(win32_thread_start_routine_tuple_allocate_guard &&other) noexcept = default;
3430

3531
constexpr ~win32_thread_start_routine_tuple_allocate_guard()
3632
{

0 commit comments

Comments
 (0)