From 88b977d78617c31f61f2a51e96b35ceeb7e9db72 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 27 Apr 2023 14:35:38 +0200 Subject: made Ref<> constructor explicit (#262) This change makes the Ref<> constructor explicit, which can help avoid unnecessary overheads and other accidents --- zenserver/testing/httptest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zenserver/testing/httptest.cpp') diff --git a/zenserver/testing/httptest.cpp b/zenserver/testing/httptest.cpp index 10b69c469..349a95ab3 100644 --- a/zenserver/testing/httptest.cpp +++ b/zenserver/testing/httptest.cpp @@ -128,14 +128,14 @@ HttpTestingService::HandlePackageRequest(HttpServerRequest& HttpServiceRequest) m_HandlerMap.erase(It); - return Handler.Get(); + return Handler; } - auto InsertResult = m_HandlerMap.insert({RequestId, nullptr}); + auto InsertResult = m_HandlerMap.insert({RequestId, Ref()}); _.ReleaseNow(); - return (InsertResult.first->second = new PackageHandler(*this, RequestId)).Get(); + return (InsertResult.first->second = Ref(new PackageHandler(*this, RequestId))); } void -- cgit v1.2.3