aboutsummaryrefslogtreecommitdiff
path: root/zenserver/testing/httptest.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-04-27 14:35:38 +0200
committerGitHub <[email protected]>2023-04-27 14:35:38 +0200
commit88b977d78617c31f61f2a51e96b35ceeb7e9db72 (patch)
tree23a34aea9319a9f4dd41fbc39a51a783aeba7f0f /zenserver/testing/httptest.cpp
parentbugfixes (#261) (diff)
downloadzen-88b977d78617c31f61f2a51e96b35ceeb7e9db72.tar.xz
zen-88b977d78617c31f61f2a51e96b35ceeb7e9db72.zip
made Ref<> constructor explicit (#262)
This change makes the Ref<> constructor explicit, which can help avoid unnecessary overheads and other accidents
Diffstat (limited to 'zenserver/testing/httptest.cpp')
-rw-r--r--zenserver/testing/httptest.cpp6
1 files changed, 3 insertions, 3 deletions
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<PackageHandler>()});
_.ReleaseNow();
- return (InsertResult.first->second = new PackageHandler(*this, RequestId)).Get();
+ return (InsertResult.first->second = Ref<PackageHandler>(new PackageHandler(*this, RequestId)));
}
void