diff options
author | Mikhail Gorbushin <m.gorbushin@corp.mail.ru> | 2018-08-31 11:35:44 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-08-31 15:34:54 +0300 |
commit | 7b1b6d68940678abe4b182e7eaab425f8e8f5bfa (patch) | |
tree | 1a60cef3101193a11f346727ead8f8dd1a58199d /map | |
parent | e73f3c434b1040685c365383baebab93411205bb (diff) |
remove my::make_unique
Diffstat (limited to 'map')
-rw-r--r-- | map/booking_availability_filter.cpp | 5 | ||||
-rw-r--r-- | map/bookmark_manager.cpp | 6 | ||||
-rw-r--r-- | map/discovery/discovery_search.cpp | 3 | ||||
-rw-r--r-- | map/framework.cpp | 7 | ||||
-rw-r--r-- | map/transit/transit_display.cpp | 4 | ||||
-rw-r--r-- | map/transit/transit_reader.cpp | 9 |
6 files changed, 19 insertions, 15 deletions
diff --git a/map/booking_availability_filter.cpp b/map/booking_availability_filter.cpp index ba7c068d06..bb05b71e9f 100644 --- a/map/booking_availability_filter.cpp +++ b/map/booking_availability_filter.cpp @@ -12,6 +12,7 @@ #include "platform/platform.hpp" #include <algorithm> +#include <memory> #include <utility> #include <vector> @@ -109,7 +110,7 @@ void PrepareData(DataSource const & dataSource, search::Results const & results, { if (mwmId != featureId.m_mwmId) { - guard = my::make_unique<FeaturesLoaderGuard>(dataSource, featureId.m_mwmId); + guard = std::make_unique<FeaturesLoaderGuard>(dataSource, featureId.m_mwmId); mwmId = featureId.m_mwmId; } @@ -226,7 +227,7 @@ void AvailabilityFilter::GetFeaturesFromCache(search::Results const & results, { if (mwmId != featureId.m_mwmId) { - guard = my::make_unique<FeaturesLoaderGuard>(GetDelegate().GetDataSource(), featureId.m_mwmId); + guard = std::make_unique<FeaturesLoaderGuard>(GetDelegate().GetDataSource(), featureId.m_mwmId); mwmId = featureId.m_mwmId; } diff --git a/map/bookmark_manager.cpp b/map/bookmark_manager.cpp index 512b2d895f..12f9fab0ae 100644 --- a/map/bookmark_manager.cpp +++ b/map/bookmark_manager.cpp @@ -28,7 +28,6 @@ #include "geometry/transformations.hpp" #include "base/macros.hpp" -#include "base/stl_add.hpp" #include "base/string_utils.hpp" #include "std/target_os.hpp" @@ -40,6 +39,7 @@ #include <fstream> #include <iomanip> #include <list> +#include <memory> #include <sstream> using namespace std::placeholders; @@ -1355,7 +1355,7 @@ kml::MarkGroupId BookmarkManager::CreateBookmarkCategory(kml::CategoryData && da data.m_id = UserMarkIdStorage::Instance().GetNextCategoryId(); auto groupId = data.m_id; CHECK_EQUAL(m_categories.count(groupId), 0, ()); - m_categories[groupId] = my::make_unique<BookmarkCategory>(std::move(data), autoSave); + m_categories[groupId] = std::make_unique<BookmarkCategory>(std::move(data), autoSave); UpdateBmGroupIdList(); m_changesTracker.OnAddGroup(groupId); return groupId; @@ -1366,7 +1366,7 @@ kml::MarkGroupId BookmarkManager::CreateBookmarkCategory(std::string const & nam CHECK_THREAD_CHECKER(m_threadChecker, ()); auto const groupId = UserMarkIdStorage::Instance().GetNextCategoryId(); CHECK_EQUAL(m_categories.count(groupId), 0, ()); - m_categories[groupId] = my::make_unique<BookmarkCategory>(name, groupId, autoSave); + m_categories[groupId] = std::make_unique<BookmarkCategory>(name, groupId, autoSave); m_categories[groupId]->SetAuthor(m_user.GetUserName(), m_user.GetUserId()); UpdateBmGroupIdList(); m_changesTracker.OnAddGroup(groupId); diff --git a/map/discovery/discovery_search.cpp b/map/discovery/discovery_search.cpp index 043abdd324..c8519569ba 100644 --- a/map/discovery/discovery_search.cpp +++ b/map/discovery/discovery_search.cpp @@ -12,6 +12,7 @@ #include "base/string_utils.hpp" #include <algorithm> +#include <memory> #include <set> #include <utility> @@ -40,7 +41,7 @@ FeatureType MakeFeatureTypeWithCachedGuard(DataSource const & dataSource, MwmSet { if (mwmId != id.m_mwmId) { - guard = my::make_unique<FeaturesLoaderGuard>(dataSource, id.m_mwmId); + guard = std::make_unique<FeaturesLoaderGuard>(dataSource, id.m_mwmId); mwmId = id.m_mwmId; } diff --git a/map/framework.cpp b/map/framework.cpp index 64c5dc8a74..19c6196471 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -94,7 +94,6 @@ #include "base/logging.hpp" #include "base/math.hpp" #include "base/scope_guard.hpp" -#include "base/stl_add.hpp" #include "base/stl_helpers.hpp" #include "base/timer.hpp" @@ -107,6 +106,8 @@ #include "3party/Alohalytics/src/alohalytics.h" +#include <memory> + using namespace storage; using namespace routing; using namespace location; @@ -3460,10 +3461,10 @@ void Framework::InitTaxiEngine() ASSERT(m_infoGetter, ()); ASSERT(m_cityFinder, ()); - m_taxiEngine = my::make_unique<taxi::Engine>(); + m_taxiEngine = std::make_unique<taxi::Engine>(); m_taxiEngine->SetDelegate( - my::make_unique<TaxiDelegate>(GetStorage(), *m_infoGetter, *m_cityFinder)); + std::make_unique<TaxiDelegate>(GetStorage(), *m_infoGetter, *m_cityFinder)); } void Framework::SetPlacePageLocation(place_page::Info & info) diff --git a/map/transit/transit_display.cpp b/map/transit/transit_display.cpp index 001ac2ba6c..4ae7135397 100644 --- a/map/transit/transit_display.cpp +++ b/map/transit/transit_display.cpp @@ -5,6 +5,8 @@ #include "routing/routing_session.hpp" +#include <memory> + using namespace std; using namespace routing; @@ -420,7 +422,7 @@ void TransitRouteDisplay::CollectTransitDisplayInfo(vector<RouteSegment> const & auto & mwmTransit = transitDisplayInfos[mwmId]; if (mwmTransit == nullptr) - mwmTransit = my::make_unique<TransitDisplayInfo>(); + mwmTransit = make_unique<TransitDisplayInfo>(); TransitInfo const & transitInfo = s.GetTransitInfo(); switch (transitInfo.GetType()) diff --git a/map/transit/transit_reader.cpp b/map/transit/transit_reader.cpp index d0eaeab246..bc32c4b6a5 100644 --- a/map/transit/transit_reader.cpp +++ b/map/transit/transit_reader.cpp @@ -13,10 +13,9 @@ #include "drape_frontend/stylist.hpp" #include "drape_frontend/visual_params.hpp" -#include "base/stl_add.hpp" - #include <algorithm> #include <chrono> +#include <memory> using namespace routing; using namespace std; @@ -46,7 +45,7 @@ void ReadTransitTask::Init(uint64_t id, MwmSet::MwmId const & mwmId, if (transitInfo == nullptr) { m_loadSubset = false; - m_transitInfo = my::make_unique<TransitDisplayInfo>(); + m_transitInfo = make_unique<TransitDisplayInfo>(); } else { @@ -157,7 +156,7 @@ void TransitReadManager::Start() using namespace placeholders; uint8_t constexpr kThreadsCount = 1; - m_threadsPool = my::make_unique<threads::ThreadPool>( + m_threadsPool = make_unique<threads::ThreadPool>( kThreadsCount, bind(&TransitReadManager::OnTaskCompleted, this, _1)); } @@ -361,7 +360,7 @@ bool TransitReadManager::GetTransitDisplayInfo(TransitDisplayInfos & transitDisp for (auto & mwmTransitPair : transitDisplayInfos) { auto const & mwmId = mwmTransitPair.first; - auto task = my::make_unique<ReadTransitTask>(m_dataSource, m_readFeaturesFn); + auto task = make_unique<ReadTransitTask>(m_dataSource, m_readFeaturesFn); task->Init(groupId, mwmId, move(mwmTransitPair.second)); transitTasks[mwmId] = move(task); } |