diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-08-31 01:19:20 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-01 01:22:14 +0200 |
commit | 271d6f494fb3f4a6896408fff95f3a388ec0174a (patch) | |
tree | 48e3bb7bcd99df573721bceecafb649387081e98 /Userland/Services/RequestServer | |
parent | 71f345bbb857184a21730d37bb2f62acc93501f4 (diff) | |
download | serenity-271d6f494fb3f4a6896408fff95f3a388ec0174a.zip |
RequestServer: Use smart pointers for allocating protocols
Diffstat (limited to 'Userland/Services/RequestServer')
-rw-r--r-- | Userland/Services/RequestServer/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Services/RequestServer/main.cpp b/Userland/Services/RequestServer/main.cpp index 6f8e488b73..e3fea3fb0d 100644 --- a/Userland/Services/RequestServer/main.cpp +++ b/Userland/Services/RequestServer/main.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include <AK/OwnPtr.h> #include <LibCore/EventLoop.h> #include <LibCore/LocalServer.h> #include <LibIPC/ClientConnection.h> @@ -38,9 +39,9 @@ int main(int, char**) return 1; } - [[maybe_unused]] auto gemini = new RequestServer::GeminiProtocol; - [[maybe_unused]] auto http = new RequestServer::HttpProtocol; - [[maybe_unused]] auto https = new RequestServer::HttpsProtocol; + [[maybe_unused]] auto gemini = make<RequestServer::GeminiProtocol>(); + [[maybe_unused]] auto http = make<RequestServer::HttpProtocol>(); + [[maybe_unused]] auto https = make<RequestServer::HttpsProtocol>(); auto socket = Core::LocalSocket::take_over_accepted_socket_from_system_server(); VERIFY(socket); |