diff options
| author | Stefan Boberg <[email protected]> | 2023-04-27 14:35:38 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-27 14:35:38 +0200 |
| commit | 88b977d78617c31f61f2a51e96b35ceeb7e9db72 (patch) | |
| tree | 23a34aea9319a9f4dd41fbc39a51a783aeba7f0f /zenserver/testing/httptest.cpp | |
| parent | bugfixes (#261) (diff) | |
| download | zen-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.cpp | 6 |
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 |