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);