From c2a2d35c1ba80d69f4a63ca68c389e95183a47e7 Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Wed, 20 Apr 2022 12:00:11 +0200 Subject: [PATCH] Fixed srt::sync::CThread::id. Added default constructor, dropped constantness. --- srtcore/sync.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/srtcore/sync.h b/srtcore/sync.h index cf3a3aa751..cef41f17ae 100644 --- a/srtcore/sync.h +++ b/srtcore/sync.h @@ -770,11 +770,17 @@ class CThread struct id { + id() + : value() + { + } + explicit id(const pthread_t t) : value(t) {} - const pthread_t value; + pthread_t value; + inline bool operator==(const id& second) const { return pthread_equal(value, second.value) != 0;