mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #54769 from Avogar/fix-timer-descriptor
Don't use default move assignment in TimerDescriptor
This commit is contained in:
commit
b8b3c674f0
@ -32,6 +32,12 @@ TimerDescriptor::TimerDescriptor(TimerDescriptor && other) noexcept : timer_fd(o
|
||||
other.timer_fd = -1;
|
||||
}
|
||||
|
||||
TimerDescriptor & TimerDescriptor::operator=(DB::TimerDescriptor && other) noexcept
|
||||
{
|
||||
std::swap(timer_fd, other.timer_fd);
|
||||
return *this;
|
||||
}
|
||||
|
||||
TimerDescriptor::~TimerDescriptor()
|
||||
{
|
||||
/// Do not check for result cause cannot throw exception.
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
TimerDescriptor(const TimerDescriptor &) = delete;
|
||||
TimerDescriptor & operator=(const TimerDescriptor &) = delete;
|
||||
TimerDescriptor(TimerDescriptor && other) noexcept;
|
||||
TimerDescriptor & operator=(TimerDescriptor &&) = default;
|
||||
TimerDescriptor & operator=(TimerDescriptor &&) noexcept;
|
||||
|
||||
int getDescriptor() const { return timer_fd; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user