From 3943d0f5a295d86b2ea04a90ab1fb6fe8425ab2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20G=C3=A9czi?= Date: Sun, 27 Aug 2023 00:00:05 +0000 Subject: [PATCH] [platform][qt] Use unique_ptr in CreateDesktopLocationService MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferenc Géczi --- platform/location_service.cpp | 4 ++-- platform/location_service.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/location_service.cpp b/platform/location_service.cpp index b920219c4b..c192ecb9d5 100644 --- a/platform/location_service.cpp +++ b/platform/location_service.cpp @@ -95,7 +95,7 @@ public: }; } // namespace location -location::LocationService * CreateDesktopLocationService(location::LocationObserver & observer) +std::unique_ptr CreateDesktopLocationService(location::LocationObserver & observer) { - return new location::DesktopLocationService(observer); + return std::make_unique(observer); } diff --git a/platform/location_service.hpp b/platform/location_service.hpp index c4057fe421..f89333da02 100644 --- a/platform/location_service.hpp +++ b/platform/location_service.hpp @@ -29,4 +29,4 @@ public: } // namespace location -extern "C" location::LocationService * CreateDesktopLocationService(location::LocationObserver & observer); +std::unique_ptr CreateDesktopLocationService(location::LocationObserver & observer);