Merge remote-tracking branches 'neheb/1', 'neheb/2', 'neheb/3', 'neheb/4' and 'neheb/5'

This commit is contained in:
Max Kellermann
2021-11-20 07:55:24 +01:00
72 changed files with 211 additions and 211 deletions

View File

@@ -61,7 +61,7 @@ public:
CurlSocket(const CurlSocket &) = delete;
CurlSocket &operator=(const CurlSocket &) = delete;
auto &GetEventLoop() const noexcept {
[[nodiscard]] auto &GetEventLoop() const noexcept {
return socket_event.GetEventLoop();
}
@@ -73,7 +73,7 @@ public:
void *userp, void *socketp) noexcept;
private:
SocketDescriptor GetSocket() const noexcept {
[[nodiscard]] SocketDescriptor GetSocket() const noexcept {
return socket_event.GetSocket();
}

View File

@@ -40,7 +40,7 @@ CurlGlobal *CurlInit::instance;
CurlInit::CurlInit(EventLoop &event_loop)
{
const std::lock_guard<Mutex> protect(mutex);
const std::scoped_lock<Mutex> protect(mutex);
if (++ref > 1) {
assert(&event_loop == &instance->GetEventLoop());
return;
@@ -56,7 +56,7 @@ CurlInit::CurlInit(EventLoop &event_loop)
CurlInit::~CurlInit() noexcept
{
const std::lock_guard<Mutex> protect(mutex);
const std::scoped_lock<Mutex> protect(mutex);
if (--ref > 0)
return;