Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@mapswithme.com>2014-08-07 01:45:40 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:25:03 +0300
commitbaf239aef8bfbc76b2e1b09c5dc59b8463160a3b (patch)
treec9896e450a4a8a7113b94a74809d7dbc7cb98eeb
parent180657e756fefbe5d601c64b860ee470217b4956 (diff)
[c++11] Migrated from scoped_ptr to unique_ptr
-rw-r--r--android/jni/com/mapswithme/core/logging.cpp14
-rw-r--r--android/jni/com/mapswithme/maps/Framework.hpp2
-rw-r--r--base/resource_pool.hpp4
-rw-r--r--base/scheduled_task.hpp4
-rw-r--r--coding/blob_storage.hpp4
-rw-r--r--coding/coding_tests/trie_test.cpp6
-rw-r--r--coding/file_sort.hpp4
-rw-r--r--coding/file_writer.hpp4
-rw-r--r--coding/polymorph_reader.hpp4
-rw-r--r--coding/reader_cache.hpp1
-rw-r--r--coding/trie.hpp4
-rw-r--r--drape/gpu_program.hpp4
-rw-r--r--generator/dumper.cpp2
-rw-r--r--generator/feature_generator.cpp10
-rw-r--r--generator/osm_element.hpp2
-rw-r--r--generator/polygonizer.hpp1
-rw-r--r--gui/button.hpp4
-rw-r--r--gui/cached_text_view.hpp4
-rw-r--r--gui/controller.hpp4
-rw-r--r--gui/image_view.hpp4
-rw-r--r--indexer/search_index_builder.cpp2
-rw-r--r--indexer/string_file.hpp6
-rw-r--r--map/drawer.cpp4
-rw-r--r--map/drawer.hpp2
-rw-r--r--map/framework.cpp6
-rw-r--r--map/framework.hpp10
-rw-r--r--map/location_state.hpp8
-rw-r--r--map/map_tests/bookmarks_test.cpp4
-rw-r--r--map/navigator.hpp1
-rw-r--r--map/user_mark_container.cpp6
-rw-r--r--platform/http_request.cpp6
-rw-r--r--platform/platform_tests/downloader_test.cpp28
-rw-r--r--qt/draw_widget.hpp8
-rw-r--r--qt/mainwindow.cpp3
-rw-r--r--qt/mainwindow.hpp4
-rw-r--r--qt/search_panel.cpp2
-rw-r--r--routing/features_road_graph.hpp4
-rw-r--r--routing/road_graph_router.hpp6
-rw-r--r--search/feature_offset_match.hpp27
-rw-r--r--search/search_engine.hpp6
-rw-r--r--search/search_query.cpp12
-rw-r--r--search/search_query.hpp1
-rw-r--r--storage/guides.hpp4
-rw-r--r--storage/storage.hpp4
-rw-r--r--storage/storage_tests/country_info_test.cpp4
45 files changed, 116 insertions, 138 deletions
diff --git a/android/jni/com/mapswithme/core/logging.cpp b/android/jni/com/mapswithme/core/logging.cpp
index abc5ac9bec..dda70fe4ba 100644
--- a/android/jni/com/mapswithme/core/logging.cpp
+++ b/android/jni/com/mapswithme/core/logging.cpp
@@ -9,7 +9,7 @@
#include "../../../../../coding/file_writer.hpp"
#include "../../../../../platform/platform.hpp"
-#include "../../../../../std/scoped_ptr.hpp"
+#include "../../../../../std/unique_ptr.hpp"
//#define MWM_LOG_TO_FILE
@@ -35,21 +35,21 @@ void AndroidLogMessage(LogLevel l, SrcPoint const & src, string const & s)
string const out = DebugPrint(src) + " " + s;
__android_log_write(pr, "MapsWithMe_JNI", out.c_str());
}
-
+
void AndroidLogToFile(LogLevel l, SrcPoint const & src, string const & s)
{
- static scoped_ptr<FileWriter> file;
-
+ static unique_ptr<FileWriter> file;
+
if (file == NULL)
{
if (GetPlatform().WritableDir().empty())
return;
-
+
file.reset(new FileWriter(GetPlatform().WritablePathForFile("logging.txt")));
}
-
+
string srcString = DebugPrint(src) + " " + s + "\n";
-
+
file->Write(srcString.c_str(), srcString.size());
file->Flush();
}
diff --git a/android/jni/com/mapswithme/maps/Framework.hpp b/android/jni/com/mapswithme/maps/Framework.hpp
index c9a7c2c08a..26afbdb095 100644
--- a/android/jni/com/mapswithme/maps/Framework.hpp
+++ b/android/jni/com/mapswithme/maps/Framework.hpp
@@ -47,7 +47,7 @@ namespace android
math::LowPassVector<float, 3> m_sensors[2];
- scoped_ptr<ScheduledTask> m_scheduledTask;
+ unique_ptr<ScheduledTask> m_scheduledTask;
bool m_wasLongClick;
void StartTouchTask(double x, double y, unsigned ms);
diff --git a/base/resource_pool.hpp b/base/resource_pool.hpp
index 70df704d0f..8570e292e2 100644
--- a/base/resource_pool.hpp
+++ b/base/resource_pool.hpp
@@ -6,7 +6,7 @@
#include "assert.hpp"
#include "../std/bind.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
struct BasePoolElemFactory
{
@@ -288,7 +288,7 @@ class ResourcePoolImpl : public ResourcePool<typename TPoolTraits::elem_t>
{
private:
- scoped_ptr<TPoolTraits> m_traits;
+ unique_ptr<TPoolTraits> const m_traits;
public:
diff --git a/base/scheduled_task.hpp b/base/scheduled_task.hpp
index f3db1df0e6..22441eee8b 100644
--- a/base/scheduled_task.hpp
+++ b/base/scheduled_task.hpp
@@ -4,7 +4,7 @@
#include "condition.hpp"
#include "../std/function.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
/// Class, which performs any function when the specified
@@ -25,7 +25,7 @@ class ScheduledTask
virtual void Cancel();
};
- scoped_ptr<Routine> m_routine;
+ unique_ptr<Routine> const m_routine;
threads::Thread m_thread;
threads::Condition m_cond;
diff --git a/coding/blob_storage.hpp b/coding/blob_storage.hpp
index 51aafcb051..a7b907d1fd 100644
--- a/coding/blob_storage.hpp
+++ b/coding/blob_storage.hpp
@@ -2,7 +2,7 @@
#include "dd_vector.hpp"
#include "polymorph_reader.hpp"
#include "../std/function.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/string.hpp"
#include "../base/base.hpp"
#include "../base/exception.hpp"
@@ -36,7 +36,7 @@ private:
uint32_t m_bitsInChunkSize;
static uint32_t const HEADER_SIZE = 4;
- scoped_ptr<Reader const> m_pReader;
+ unique_ptr<Reader const> const m_pReader;
DecompressorType m_decompressor;
DDVector<uint32_t, PolymorphReader> m_blobInfo;
diff --git a/coding/coding_tests/trie_test.cpp b/coding/coding_tests/trie_test.cpp
index 2877e8ebc6..4bed389d6e 100644
--- a/coding/coding_tests/trie_test.cpp
+++ b/coding/coding_tests/trie_test.cpp
@@ -211,9 +211,9 @@ UNIT_TEST(TrieBuilder_Build)
trie::reader::FixedSizeValueReader<4>::ValueType,
trie::reader::FixedSizeValueReader<1>::ValueType
> IteratorType;
- scoped_ptr<IteratorType> root(trie::reader::ReadTrie(memReader,
- trie::reader::FixedSizeValueReader<4>(),
- trie::reader::FixedSizeValueReader<1>()));
+ unique_ptr<IteratorType> const root(trie::reader::ReadTrie(memReader,
+ trie::reader::FixedSizeValueReader<4>(),
+ trie::reader::FixedSizeValueReader<1>()));
vector<KeyValuePair> res;
KeyValuePairBackInserter f;
trie::ForEachRef(*root, f, vector<trie::TrieChar>());
diff --git a/coding/file_sort.hpp b/coding/file_sort.hpp
index 8643ce5dc7..a2ed575759 100644
--- a/coding/file_sort.hpp
+++ b/coding/file_sort.hpp
@@ -8,7 +8,7 @@
#include "../std/cstdlib.hpp"
#include "../std/functional.hpp"
#include "../std/queue.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/string.hpp"
#include "../std/utility.hpp"
#include "../std/vector.hpp"
@@ -134,7 +134,7 @@ private:
string const m_TmpFileName;
uint32_t const m_BufferCapacity;
OutputSinkT & m_OutputSink;
- scoped_ptr<FileWriter> m_pTmpWriter;
+ unique_ptr<FileWriter> m_pTmpWriter;
vector<T> m_Buffer;
uint32_t m_ItemCount;
LessT m_Less;
diff --git a/coding/file_writer.hpp b/coding/file_writer.hpp
index ad2f2afc1e..aeceb19f9b 100644
--- a/coding/file_writer.hpp
+++ b/coding/file_writer.hpp
@@ -1,7 +1,7 @@
#pragma once
#include "writer.hpp"
#include "../base/base.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
namespace my { class FileData; }
@@ -46,6 +46,6 @@ public:
private:
typedef my::FileData fdata_t;
- scoped_ptr<fdata_t> m_pFileData;
+ unique_ptr<fdata_t> m_pFileData;
bool m_bTruncOnClose;
};
diff --git a/coding/polymorph_reader.hpp b/coding/polymorph_reader.hpp
index a22d660f6f..6f5d0e11f0 100644
--- a/coding/polymorph_reader.hpp
+++ b/coding/polymorph_reader.hpp
@@ -1,6 +1,6 @@
#pragma once
#include "../coding/reader.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
class PolymorphReader
{
@@ -37,5 +37,5 @@ public:
}
private:
- scoped_ptr<Reader const> m_pReader;
+ unique_ptr<Reader const> m_pReader;
};
diff --git a/coding/reader_cache.hpp b/coding/reader_cache.hpp
index 21bb668dff..386c63d01c 100644
--- a/coding/reader_cache.hpp
+++ b/coding/reader_cache.hpp
@@ -6,7 +6,6 @@
#include "../base/logging.hpp"
#include "../base/stats.hpp"
-#include "../std/scoped_ptr.hpp"
#include "../std/vector.hpp"
#include "../std/cstring.hpp"
diff --git a/coding/trie.hpp b/coding/trie.hpp
index 9e689f0c25..57a4b98194 100644
--- a/coding/trie.hpp
+++ b/coding/trie.hpp
@@ -5,7 +5,7 @@
#include "../base/buffer_vector.hpp"
//#include "../base/object_tracker.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
namespace trie
@@ -80,7 +80,7 @@ void ForEachRef(Iterator<ValueT, EdgeValueT> const & iter, F & f, StringT const
{
StringT s1(s);
s1.insert(s1.end(), iter.m_edge[i].m_str.begin(), iter.m_edge[i].m_str.end());
- scoped_ptr<Iterator<ValueT, EdgeValueT> > pIter1(iter.GoToEdge(i));
+ unique_ptr<Iterator<ValueT, EdgeValueT> > const pIter1(iter.GoToEdge(i));
ForEachRef(*pIter1, f, s1);
}
}
diff --git a/drape/gpu_program.hpp b/drape/gpu_program.hpp
index a6e65136ee..b195c37440 100644
--- a/drape/gpu_program.hpp
+++ b/drape/gpu_program.hpp
@@ -7,7 +7,7 @@
#include "../std/string.hpp"
#ifdef DEBUG
- #include "../std/scoped_ptr.hpp"
+ #include "../std/unique_ptr.hpp"
#endif
namespace dp
@@ -37,7 +37,7 @@ private:
#ifdef DEBUG
private:
- scoped_ptr<UniformValidator> m_validator;
+ unique_ptr<UniformValidator> m_validator;
public:
bool HasUniform(string const & name, glConst type, UniformSize size);
#endif
diff --git a/generator/dumper.cpp b/generator/dumper.cpp
index 38b53d30ce..926620837d 100644
--- a/generator/dumper.cpp
+++ b/generator/dumper.cpp
@@ -204,7 +204,7 @@ namespace feature
serial::CodingParams cp(search::GetCPForTrie(header.GetDefCodingParams()));
- scoped_ptr<search::TrieIterator> pTrieRoot(
+ unique_ptr<search::TrieIterator> const pTrieRoot(
::trie::reader::ReadTrie(container.GetReader(SEARCH_INDEX_FILE_TAG),
search::trie::ValueReader(cp),
search::trie::EdgeValueReader()));
diff --git a/generator/feature_generator.cpp b/generator/feature_generator.cpp
index 7030057436..5550812b3b 100644
--- a/generator/feature_generator.cpp
+++ b/generator/feature_generator.cpp
@@ -260,11 +260,11 @@ class MainFeaturesEmitter
{
typedef WorldMapGenerator<FeaturesCollector> WorldGenerator;
typedef CountryMapGenerator<Polygonizer<FeaturesCollector> > CountriesGenerator;
- scoped_ptr<CountriesGenerator> m_countries;
- scoped_ptr<WorldGenerator> m_world;
+ unique_ptr<CountriesGenerator> m_countries;
+ unique_ptr<WorldGenerator> m_world;
- scoped_ptr<CoastlineFeaturesGenerator> m_coasts;
- scoped_ptr<FeaturesCollector> m_coastsHolder;
+ unique_ptr<CoastlineFeaturesGenerator> m_coasts;
+ unique_ptr<FeaturesCollector> m_coastsHolder;
string m_srcCoastsFile;
@@ -335,9 +335,7 @@ public:
}
if (info.m_createWorld)
- {
m_world.reset(new WorldGenerator(info));
- }
}
void operator() (FeatureBuilder1 fb)
diff --git a/generator/osm_element.hpp b/generator/osm_element.hpp
index 4abf167085..497ec33ede 100644
--- a/generator/osm_element.hpp
+++ b/generator/osm_element.hpp
@@ -348,7 +348,7 @@ class SecondPassParserUsual : public SecondPassParserBase<TEmitter, THolder>
uint32_t m_coastType;
- scoped_ptr<FileWriter> m_addrWriter;
+ unique_ptr<FileWriter> m_addrWriter;
bool NeedWriteAddress(FeatureParams const & params) const
{
static ftypes::IsBuildingChecker const checker;
diff --git a/generator/polygonizer.hpp b/generator/polygonizer.hpp
index 3602224562..c214121758 100644
--- a/generator/polygonizer.hpp
+++ b/generator/polygonizer.hpp
@@ -14,7 +14,6 @@
#include "../base/buffer_vector.hpp"
#include "../base/macros.hpp"
-#include "../std/scoped_ptr.hpp"
#include "../std/string.hpp"
diff --git a/gui/button.hpp b/gui/button.hpp
index 77a094f328..c63a510260 100644
--- a/gui/button.hpp
+++ b/gui/button.hpp
@@ -5,7 +5,7 @@
#include "../std/function.hpp"
#include "../std/string.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
namespace graphics
{
@@ -32,7 +32,7 @@ namespace gui
unsigned m_minWidth;
unsigned m_minHeight;
- scoped_ptr<TextView> m_textView;
+ unique_ptr<TextView> m_textView;
map<EState, shared_ptr<graphics::DisplayList> > m_dls;
void cacheButtonBody(EState state);
diff --git a/gui/cached_text_view.hpp b/gui/cached_text_view.hpp
index 5afdaf5be2..90a531a49c 100644
--- a/gui/cached_text_view.hpp
+++ b/gui/cached_text_view.hpp
@@ -26,8 +26,8 @@ namespace gui
vector<shared_ptr<graphics::DisplayList> > m_dls;
vector<shared_ptr<graphics::DisplayList> > m_maskedDls;
- scoped_ptr<graphics::GlyphLayout> m_layout;
- scoped_ptr<graphics::GlyphLayout> m_maskedLayout;
+ unique_ptr<graphics::GlyphLayout> m_layout;
+ unique_ptr<graphics::GlyphLayout> m_maskedLayout;
mutable vector<m2::AnyRectD> m_boundRects;
diff --git a/gui/controller.hpp b/gui/controller.hpp
index f3d288d5f3..6b9e2a54e9 100644
--- a/gui/controller.hpp
+++ b/gui/controller.hpp
@@ -3,7 +3,7 @@
#include "display_list_cache.hpp"
#include "../std/shared_ptr.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/function.hpp"
#include "../std/list.hpp"
@@ -71,7 +71,7 @@ namespace gui
graphics::GlyphCache * m_GlyphCache;
/// Cache for display lists for fast rendering on GUI thread
- scoped_ptr<DisplayListCache> m_DisplayListCache;
+ unique_ptr<DisplayListCache> m_DisplayListCache;
/// Localized strings for GUI.
StringsBundle const * m_bundle;
diff --git a/gui/image_view.hpp b/gui/image_view.hpp
index 936d1093d9..73d9ebcbb0 100644
--- a/gui/image_view.hpp
+++ b/gui/image_view.hpp
@@ -5,7 +5,7 @@
#include "../graphics/image.hpp"
#include "../graphics/display_list.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
namespace graphics
{
@@ -22,7 +22,7 @@ namespace gui
graphics::Image::Info m_image;
m2::RectU m_margin;
- scoped_ptr<graphics::DisplayList> m_displayList;
+ unique_ptr<graphics::DisplayList> m_displayList;
public:
diff --git a/indexer/search_index_builder.cpp b/indexer/search_index_builder.cpp
index 528c85bb4a..7f81d0a913 100644
--- a/indexer/search_index_builder.cpp
+++ b/indexer/search_index_builder.cpp
@@ -374,7 +374,7 @@ void BuildSearchIndex(FilesContainerR const & cont, CategoriesHolder const & cat
serial::CodingParams cp(search::GetCPForTrie(header.GetDefCodingParams()));
- scoped_ptr<SynonymsHolder> synonyms;
+ unique_ptr<SynonymsHolder> synonyms;
if (header.GetType() == feature::DataHeader::world)
synonyms.reset(new SynonymsHolder(GetPlatform().WritablePathForFile(SYNONYMS_FILE)));
diff --git a/indexer/string_file.hpp b/indexer/string_file.hpp
index 2dce71f103..b6904a6683 100644
--- a/indexer/string_file.hpp
+++ b/indexer/string_file.hpp
@@ -8,7 +8,7 @@
#include "../std/iterator_facade.hpp"
#include "../std/queue.hpp"
#include "../std/functional.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
class StringsFile
@@ -89,8 +89,8 @@ public:
IteratorT End() { return IteratorT(*this, true); }
private:
- scoped_ptr<FileWriter> m_writer;
- scoped_ptr<FileReader> m_reader;
+ unique_ptr<FileWriter> m_writer;
+ unique_ptr<FileReader> m_reader;
void Flush();
bool PushNextValue(size_t i);
diff --git a/map/drawer.cpp b/map/drawer.cpp
index 633264fa2c..11aa583607 100644
--- a/map/drawer.cpp
+++ b/map/drawer.cpp
@@ -26,10 +26,8 @@ Drawer::Params::Params()
}
Drawer::Drawer(Params const & params)
- : m_visualScale(params.m_visualScale)
+ : m_visualScale(params.m_visualScale), m_pScreen(new graphics::Screen(params))
{
- m_pScreen.reset(new graphics::Screen(params));
-
for (unsigned i = 0; i < m_pScreen->pipelinesCount(); ++i)
m_pScreen->addClearPageFn(i, bind(&Drawer::ClearResourceCache, ThreadSlot(), i), 0);
}
diff --git a/map/drawer.hpp b/map/drawer.hpp
index 700f7b86f6..e90e344592 100644
--- a/map/drawer.hpp
+++ b/map/drawer.hpp
@@ -34,7 +34,7 @@ class Drawer
double m_visualScale;
int m_level;
- scoped_ptr<graphics::Screen> m_pScreen;
+ unique_ptr<graphics::Screen> const m_pScreen;
static void ClearResourceCache(size_t threadSlot, uint8_t pipelineID);
diff --git a/map/framework.cpp b/map/framework.cpp
index de72ad3af2..a231d3755d 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -193,6 +193,8 @@ Framework::Framework()
m_queryMaxScaleMode(false),
m_width(0),
m_height(0),
+ m_guiController(new gui::Controller),
+ m_animController(new anim::Controller),
m_informationDisplay(this),
m_lowestMapVersion(numeric_limits<int>::max()),
m_benchmarkEngine(0),
@@ -222,10 +224,6 @@ Framework::Framework()
m_stringsBundle.SetDefaultString("my_position", "My Position");
m_stringsBundle.SetDefaultString("routes", "Routes");
- m_animController.reset(new anim::Controller());
-
- // Init GUI controller.
- m_guiController.reset(new gui::Controller());
m_guiController->SetStringsBundle(&m_stringsBundle);
// Init information display.
diff --git a/map/framework.hpp b/map/framework.hpp
index 326764a3cd..f9b46bd6cb 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -38,7 +38,7 @@
#include "../std/vector.hpp"
#include "../std/shared_ptr.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/target_os.hpp"
#include "move_screen_task.hpp"
@@ -91,7 +91,7 @@ protected:
StringsBundle m_stringsBundle;
- mutable scoped_ptr<search::Engine> m_pSearchEngine;
+ mutable unique_ptr<search::Engine> m_pSearchEngine;
routing::RoutingEngine m_routingEngine;
routing::IRouter * CreateRouter();
@@ -105,7 +105,7 @@ protected:
typedef vector<BookmarkCategory *>::iterator CategoryIter;
- scoped_ptr<RenderPolicy> m_renderPolicy;
+ unique_ptr<RenderPolicy> m_renderPolicy;
double m_StartForegroundTime;
@@ -120,8 +120,8 @@ protected:
void StopLocationFollow();
storage::Storage m_storage;
- scoped_ptr<gui::Controller> m_guiController;
- scoped_ptr<anim::Controller> m_animController;
+ unique_ptr<gui::Controller> m_guiController;
+ unique_ptr<anim::Controller> m_animController;
InformationDisplay m_informationDisplay;
/// How many pixels around touch point are used to get bookmark or POI
diff --git a/map/location_state.hpp b/map/location_state.hpp
index 036415a34f..c6ae018202 100644
--- a/map/location_state.hpp
+++ b/map/location_state.hpp
@@ -8,7 +8,7 @@
#include "../geometry/screenbase.hpp"
#include "../std/shared_ptr.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/map.hpp"
@@ -86,9 +86,9 @@ namespace location
/// Compass Rendering Parameters
/// @{
- scoped_ptr<graphics::DisplayList> m_positionArrow;
- scoped_ptr<graphics::DisplayList> m_locationMarkDL;
- scoped_ptr<graphics::DisplayList> m_positionMarkDL;
+ unique_ptr<graphics::DisplayList> m_positionArrow;
+ unique_ptr<graphics::DisplayList> m_locationMarkDL;
+ unique_ptr<graphics::DisplayList> m_positionMarkDL;
/// @}
///
diff --git a/map/map_tests/bookmarks_test.cpp b/map/map_tests/bookmarks_test.cpp
index 445aecf17c..2e5d918136 100644
--- a/map/map_tests/bookmarks_test.cpp
+++ b/map/map_tests/bookmarks_test.cpp
@@ -190,7 +190,7 @@ UNIT_TEST(Bookmarks_ExportKML)
CheckBookmarks(cat);
TEST_EQUAL(cat.IsVisible(), true, ());
- scoped_ptr<BookmarkCategory> cat2(BookmarkCategory::CreateFromKMLFile(BOOKMARKS_FILE_NAME, framework));
+ unique_ptr<BookmarkCategory> cat2(BookmarkCategory::CreateFromKMLFile(BOOKMARKS_FILE_NAME, framework));
CheckBookmarks(*cat2);
cat2->SaveToKMLFile();
@@ -621,7 +621,7 @@ UNIT_TEST(Bookmarks_SpecialXMLNames)
TEST_EQUAL(cat1.GetBookmarksCount(), 1, ());
TEST(cat1.SaveToKMLFile(), ());
- scoped_ptr<BookmarkCategory> cat2(BookmarkCategory::CreateFromKMLFile(cat1.GetFileName(), framework));
+ unique_ptr<BookmarkCategory> const cat2(BookmarkCategory::CreateFromKMLFile(cat1.GetFileName(), framework));
TEST(cat2.get(), ());
TEST_EQUAL(cat2->GetBookmarksCount(), 1, ());
diff --git a/map/navigator.hpp b/map/navigator.hpp
index 1ea971d9f5..54d87dc3cb 100644
--- a/map/navigator.hpp
+++ b/map/navigator.hpp
@@ -9,7 +9,6 @@
#include "../base/scheduled_task.hpp"
#include "../std/function.hpp"
-#include "../std/scoped_ptr.hpp"
#include "../std/shared_ptr.hpp"
/// Calculates screen parameters in navigation (dragging, scaling, etc.).
diff --git a/map/user_mark_container.cpp b/map/user_mark_container.cpp
index 0a03eb6abc..637de6b1f5 100644
--- a/map/user_mark_container.cpp
+++ b/map/user_mark_container.cpp
@@ -16,7 +16,7 @@
#include "../base/macros.hpp"
#include "../base/stl_add.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/algorithm.hpp"
////////////////////////////////////////////////////////////////////////
@@ -171,8 +171,8 @@ void UserMarkContainer::Clear(size_t skipCount/* = 0*/)
namespace
{
- static scoped_ptr<PoiMarkPoint> s_selectionUserMark;
- static scoped_ptr<MyPositionMarkPoint> s_myPosition;
+ static unique_ptr<PoiMarkPoint> s_selectionUserMark;
+ static unique_ptr<MyPositionMarkPoint> s_myPosition;
}
void UserMarkContainer::InitStaticMarks(UserMarkContainer * container)
diff --git a/platform/http_request.cpp b/platform/http_request.cpp
index 2c50655033..92942b6d2b 100644
--- a/platform/http_request.cpp
+++ b/platform/http_request.cpp
@@ -13,7 +13,7 @@
#include "../base/logging.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#ifdef OMIM_OS_IPHONE
@@ -144,7 +144,7 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback
ThreadsContainerT m_threads;
string m_filePath;
- scoped_ptr<FileWriter> m_writer;
+ unique_ptr<FileWriter> m_writer;
size_t m_goodChunksCount;
bool m_doCleanProgressFiles;
@@ -328,7 +328,7 @@ public:
}
// Create file and reserve needed size.
- scoped_ptr<FileWriter> writer(new FileWriter(filePath + DOWNLOADING_FILE_EXTENSION, openMode));
+ unique_ptr<FileWriter> writer(new FileWriter(filePath + DOWNLOADING_FILE_EXTENSION, openMode));
// Reserving disk space is very slow on a device.
//writer->Reserve(fileSize);
diff --git a/platform/platform_tests/downloader_test.cpp b/platform/platform_tests/downloader_test.cpp
index 741e2c8f87..a7cff748b1 100644
--- a/platform/platform_tests/downloader_test.cpp
+++ b/platform/platform_tests/downloader_test.cpp
@@ -133,7 +133,7 @@ UNIT_TEST(DownloaderSimpleGet)
HttpRequest::CallbackT onProgress = bind(&DownloadObserver::OnDownloadProgress, &observer, _1);
{
// simple success case
- scoped_ptr<HttpRequest> request(HttpRequest::Get(TEST_URL1, onFinish, onProgress));
+ unique_ptr<HttpRequest> const request(HttpRequest::Get(TEST_URL1, onFinish, onProgress));
// wait until download is finished
QCoreApplication::exec();
observer.TestOk();
@@ -143,7 +143,7 @@ UNIT_TEST(DownloaderSimpleGet)
observer.Reset();
{
// We DO NOT SUPPORT redirects to avoid data corruption when downloading mwm files
- scoped_ptr<HttpRequest> request(HttpRequest::Get(TEST_URL_PERMANENT, onFinish, onProgress));
+ unique_ptr<HttpRequest> const request(HttpRequest::Get(TEST_URL_PERMANENT, onFinish, onProgress));
QCoreApplication::exec();
observer.TestFailed();
TEST_EQUAL(request->Data().size(), 0, (request->Data()));
@@ -152,7 +152,7 @@ UNIT_TEST(DownloaderSimpleGet)
observer.Reset();
{
// fail case 404
- scoped_ptr<HttpRequest> request(HttpRequest::Get(TEST_URL_404, onFinish, onProgress));
+ unique_ptr<HttpRequest> const request(HttpRequest::Get(TEST_URL_404, onFinish, onProgress));
QCoreApplication::exec();
observer.TestFailed();
TEST_EQUAL(request->Data().size(), 0, (request->Data()));
@@ -161,7 +161,7 @@ UNIT_TEST(DownloaderSimpleGet)
observer.Reset();
{
// fail case not existing host
- scoped_ptr<HttpRequest> request(HttpRequest::Get(TEST_URL_INVALID_HOST, onFinish, onProgress));
+ unique_ptr<HttpRequest> const request(HttpRequest::Get(TEST_URL_INVALID_HOST, onFinish, onProgress));
QCoreApplication::exec();
observer.TestFailed();
TEST_EQUAL(request->Data().size(), 0, (request->Data()));
@@ -180,7 +180,7 @@ UNIT_TEST(DownloaderSimpleGet)
observer.Reset();
{
// https success case
- scoped_ptr<HttpRequest> request(HttpRequest::Get(TEST_URL_HTTPS, onFinish, onProgress));
+ unique_ptr<HttpRequest> const request(HttpRequest::Get(TEST_URL_HTTPS, onFinish, onProgress));
// wait until download is finished
QCoreApplication::exec();
observer.TestOk();
@@ -206,7 +206,7 @@ UNIT_TEST(DownloaderSimplePost)
{
// simple success case
string const postData = "{\"jsonKey\":\"jsonValue\"}";
- scoped_ptr<HttpRequest> request(HttpRequest::PostJson(TEST_URL_POST, postData, onFinish, onProgress));
+ unique_ptr<HttpRequest> const request(HttpRequest::PostJson(TEST_URL_POST, postData, onFinish, onProgress));
// wait until download is finished
QCoreApplication::exec();
observer.TestOk();
@@ -402,7 +402,7 @@ UNIT_TEST(DownloadChunks)
{
// should use only one thread
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
onFinish, onProgress));
// wait until download is finished
QCoreApplication::exec();
@@ -425,7 +425,7 @@ UNIT_TEST(DownloadChunks)
{
// 3 threads - fail, because of invalid size
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
onFinish, onProgress, 2048));
// wait until download is finished
QCoreApplication::exec();
@@ -447,7 +447,7 @@ UNIT_TEST(DownloadChunks)
{
// 3 threads - succeeded
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
onFinish, onProgress, 2048));
// wait until download is finished
QCoreApplication::exec();
@@ -469,7 +469,7 @@ UNIT_TEST(DownloadChunks)
{
// 3 threads with only one valid url - succeeded
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
onFinish, onProgress, 2048));
// wait until download is finished
@@ -491,7 +491,7 @@ UNIT_TEST(DownloadChunks)
{
// 2 threads and all points to file with invalid size - fail
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
onFinish, onProgress, 2048));
// wait until download is finished
QCoreApplication::exec();
@@ -555,7 +555,7 @@ UNIT_TEST(DownloadResumeChunks)
{
DownloadObserver observer;
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
bind(&DownloadObserver::OnDownloadFinish, &observer, _1),
bind(&DownloadObserver::OnDownloadProgress, &observer, _1)));
@@ -594,7 +594,7 @@ UNIT_TEST(DownloadResumeChunks)
// 3rd step - check that resume works
{
ResumeChecker checker;
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
bind(&ResumeChecker::OnFinish, &checker, _1),
bind(&ResumeChecker::OnProgress, &checker, _1)));
QCoreApplication::exec();
@@ -626,7 +626,7 @@ UNIT_TEST(DownloadResumeChunksWithCancel)
if (arrCancelChunks[i] > 0)
observer.CancelDownloadOnGivenChunk(arrCancelChunks[i]);
- scoped_ptr<HttpRequest> request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
+ unique_ptr<HttpRequest> const request(HttpRequest::GetFile(urls, FILENAME, FILESIZE,
bind(&DownloadObserver::OnDownloadFinish, &observer, _1),
bind(&DownloadObserver::OnDownloadProgress, &observer, _1),
1024, false));
diff --git a/qt/draw_widget.hpp b/qt/draw_widget.hpp
index 477c9138ef..c4aa98e32c 100644
--- a/qt/draw_widget.hpp
+++ b/qt/draw_widget.hpp
@@ -9,7 +9,7 @@
#include "../platform/video_timer.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include <QtCore/QTimer>
#include <QtOpenGL/qgl.h>
@@ -45,8 +45,8 @@ namespace qt
bool m_isInitialized;
bool m_isTimerStarted;
- scoped_ptr<Framework> m_framework;
- scoped_ptr<VideoTimer> m_videoTimer;
+ unique_ptr<Framework> m_framework;
+ unique_ptr<VideoTimer> m_videoTimer;
bool m_isDrag;
bool m_isRotate;
@@ -140,7 +140,7 @@ namespace qt
QScaleSlider * m_pScale;
- scoped_ptr<ScheduledTask> m_scheduledTask;
+ unique_ptr<ScheduledTask> m_scheduledTask;
m2::PointD m_taskPoint;
bool m_wasLongClick, m_isCleanSingleClick;
diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp
index 967f8b1e94..9f5d81e97f 100644
--- a/qt/mainwindow.cpp
+++ b/qt/mainwindow.cpp
@@ -46,10 +46,9 @@
namespace qt
{
-MainWindow::MainWindow()
+MainWindow::MainWindow() : m_locationService(CreateDesktopLocationService(*this))
{
m_pDrawWidget = new DrawWidget(this);
- m_locationService.reset(CreateDesktopLocationService(*this));
CreateNavigationBar();
CreateSearchBarAndPanel();
diff --git a/qt/mainwindow.hpp b/qt/mainwindow.hpp
index 7b27abe1e5..2ac1339224 100644
--- a/qt/mainwindow.hpp
+++ b/qt/mainwindow.hpp
@@ -2,7 +2,7 @@
#include "../platform/location_service.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include <Qt>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
@@ -29,7 +29,7 @@ namespace qt
QDockWidget * m_Docks[1];
- scoped_ptr<location::LocationService> m_locationService;
+ unique_ptr<location::LocationService> const m_locationService;
Q_OBJECT
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp
index 78cc1c181e..6e34d5eb06 100644
--- a/qt/search_panel.cpp
+++ b/qt/search_panel.cpp
@@ -100,7 +100,7 @@ void SearchPanel::ClearResults()
void SearchPanel::OnSearchResult(ResultsT * res)
{
- scoped_ptr<ResultsT> guard(res);
+ unique_ptr<ResultsT> const guard(res);
if (res->IsEndMarker())
{
diff --git a/routing/features_road_graph.hpp b/routing/features_road_graph.hpp
index 9a98bcf0ed..aff8162c85 100644
--- a/routing/features_road_graph.hpp
+++ b/routing/features_road_graph.hpp
@@ -1,7 +1,7 @@
#pragma once
#include "road_graph.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
class Index;
class FeatureType;
@@ -38,7 +38,7 @@ private:
private:
Index const * m_pIndex;
size_t m_mwmID;
- scoped_ptr<IVehicleModel> m_vehicleModel;
+ unique_ptr<IVehicleModel> const m_vehicleModel;
};
} // namespace routing
diff --git a/routing/road_graph_router.hpp b/routing/road_graph_router.hpp
index 6380cea2d8..9fb0c7172d 100644
--- a/routing/road_graph_router.hpp
+++ b/routing/road_graph_router.hpp
@@ -6,7 +6,7 @@
#include "../geometry/point2d.hpp"
#include "../std/vector.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
class Index;
@@ -33,8 +33,8 @@ protected:
size_t GetRoadPos(m2::PointD const & pt, vector<RoadPos> & pos);
bool IsMyMWM(size_t mwmID) const;
- scoped_ptr<IRoadGraph> m_pRoadGraph;
- scoped_ptr<IVehicleModel> m_vehicleModel;
+ unique_ptr<IRoadGraph> m_pRoadGraph;
+ unique_ptr<IVehicleModel> const m_vehicleModel;
Index const * m_pIndex;
};
diff --git a/search/feature_offset_match.hpp b/search/feature_offset_match.hpp
index feb4bd77d8..78326b2fca 100644
--- a/search/feature_offset_match.hpp
+++ b/search/feature_offset_match.hpp
@@ -9,7 +9,7 @@
#include "../base/mutex.hpp"
#include "../std/algorithm.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/unordered_set.hpp"
#include "../std/utility.hpp"
#include "../std/vector.hpp"
@@ -40,7 +40,7 @@ TrieIterator * MoveTrieIteratorToString(TrieIterator const & trieRoot,
symbolsMatched = 0;
bFullEdgeMatched = false;
- scoped_ptr<search::TrieIterator> pIter(trieRoot.Clone());
+ unique_ptr<search::TrieIterator> pIter(trieRoot.Clone());
size_t const szQuery = queryS.size();
while (symbolsMatched < szQuery)
@@ -105,7 +105,7 @@ void FullMatchInTrie(TrieIterator const & trieRoot,
size_t symbolsMatched = 0;
bool bFullEdgeMatched;
- scoped_ptr<search::TrieIterator> pIter(
+ unique_ptr<search::TrieIterator> const pIter(
MoveTrieIteratorToString(trieRoot, s, symbolsMatched, bFullEdgeMatched));
if (!pIter || !bFullEdgeMatched || symbolsMatched != s.size())
@@ -156,7 +156,7 @@ void PrefixMatchInTrie(TrieIterator const & trieRoot,
{
// Next 2 lines don't throw any exceptions while moving
// ownership from container to smart pointer.
- scoped_ptr<search::TrieIterator> pIter(trieQueue.back());
+ unique_ptr<search::TrieIterator> const pIter(trieQueue.back());
trieQueue.pop_back();
for (size_t i = 0; i < pIter->m_value.size(); ++i)
@@ -189,24 +189,13 @@ template <class FilterT> class OffsetIntersecter
typedef unordered_set<ValueT, HashFn, EqualFn> SetType;
FilterT const & m_filter;
- scoped_ptr<SetType> m_prevSet;
- scoped_ptr<SetType> m_set;
-
- void InitSet(scoped_ptr<SetType> & ptr)
- {
- ptr.reset(new SetType());
-
- // this is not std compatible, but important for google::dense_hash_set
- //ValueT zero;
- //zero.m_featureId = 0;
- //ptr->set_empty_key(zero);
- }
+ unique_ptr<SetType> m_prevSet;
+ unique_ptr<SetType> m_set;
public:
explicit OffsetIntersecter(FilterT const & filter)
- : m_filter(filter)
+ : m_filter(filter), m_set(new SetType)
{
- InitSet(m_set);
}
void operator() (ValueT const & v)
@@ -223,7 +212,7 @@ public:
void NextStep()
{
if (!m_prevSet)
- InitSet(m_prevSet);
+ m_prevSet.reset(new SetType);
m_prevSet.swap(m_set);
m_set->clear();
diff --git a/search/search_engine.hpp b/search/search_engine.hpp
index f096dcb81a..c65a723dd9 100644
--- a/search/search_engine.hpp
+++ b/search/search_engine.hpp
@@ -9,7 +9,7 @@
#include "../base/mutex.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/string.hpp"
#include "../std/function.hpp"
@@ -78,8 +78,8 @@ private:
SearchParams m_params;
m2::RectD m_viewport;
- scoped_ptr<search::Query> m_pQuery;
- scoped_ptr<EngineData> m_pData;
+ unique_ptr<search::Query> m_pQuery;
+ unique_ptr<EngineData> const m_pData;
};
} // namespace search
diff --git a/search/search_query.cpp b/search/search_query.cpp
index de60262084..2a1bc13446 100644
--- a/search/search_query.cpp
+++ b/search/search_query.cpp
@@ -538,7 +538,7 @@ namespace impl
{
Query & m_query;
- scoped_ptr<Index::FeaturesLoaderGuard> m_pFV;
+ unique_ptr<Index::FeaturesLoaderGuard> m_pFV;
// For the best performance, incoming id's should be sorted by id.first (mwm file id).
void LoadFeature(FeatureID const & id, FeatureType & f, string & name, string & country)
@@ -1885,7 +1885,7 @@ void Query::SearchLocality(MwmValue * pMwm, impl::Locality & res1, impl::Region
serial::CodingParams cp(GetCPForTrie(pMwm->GetHeader().GetDefCodingParams()));
ModelReaderPtr searchReader = pMwm->m_cont.GetReader(SEARCH_INDEX_FILE_TAG);
- scoped_ptr<TrieIterator> pTrieRoot(::trie::reader::ReadTrie(
+ unique_ptr<TrieIterator> const pTrieRoot(::trie::reader::ReadTrie(
SubReaderWrapper<Reader>(searchReader.GetPtr()),
trie::ValueReader(cp),
trie::EdgeValueReader()));
@@ -1899,7 +1899,7 @@ void Query::SearchLocality(MwmValue * pMwm, impl::Locality & res1, impl::Region
int8_t const lang = static_cast<int8_t>(edge[0]);
if (edge[0] < search::CATEGORIES_LANG && params.IsLangExist(lang))
{
- scoped_ptr<TrieIterator> pLangRoot(pTrieRoot->GoToEdge(i));
+ unique_ptr<TrieIterator> const pLangRoot(pTrieRoot->GoToEdge(i));
// gel all localities from mwm
impl::DoFindLocality doFind(*this, pMwm, lang);
@@ -2023,7 +2023,7 @@ namespace
void FillCategories(Query::Params const & params, TrieIterator const * pTrieRoot,
TrieValuesHolder<FeaturesFilter> & categoriesHolder)
{
- scoped_ptr<TrieIterator> pCategoriesRoot;
+ unique_ptr<TrieIterator> pCategoriesRoot;
typedef TrieIterator::Edge::EdgeStrT EdgeT;
EdgeT categoriesEdge;
@@ -2066,7 +2066,7 @@ void Query::SearchInMWM(Index::MwmLock const & mwmLock, Params const & params,
serial::CodingParams cp(GetCPForTrie(header.GetDefCodingParams()));
ModelReaderPtr searchReader = pMwm->m_cont.GetReader(SEARCH_INDEX_FILE_TAG);
- scoped_ptr<TrieIterator> pTrieRoot(::trie::reader::ReadTrie(
+ unique_ptr<TrieIterator> const pTrieRoot(::trie::reader::ReadTrie(
SubReaderWrapper<Reader>(searchReader.GetPtr()),
trie::ValueReader(cp),
trie::EdgeValueReader()));
@@ -2088,7 +2088,7 @@ void Query::SearchInMWM(Index::MwmLock const & mwmLock, Params const & params,
if (edge[0] < search::CATEGORIES_LANG && params.IsLangExist(lang))
{
- scoped_ptr<TrieIterator> pLangRoot(pTrieRoot->GoToEdge(i));
+ unique_ptr<TrieIterator> const pLangRoot(pTrieRoot->GoToEdge(i));
MatchFeaturesInTrie(params.m_tokens, params.m_prefixTokens,
TrieRootPrefix(*pLangRoot, edge),
diff --git a/search/search_query.hpp b/search/search_query.hpp
index 8141415658..c30ac2da8b 100644
--- a/search/search_query.hpp
+++ b/search/search_query.hpp
@@ -13,7 +13,6 @@
#include "../base/string_utils.hpp"
#include "../std/map.hpp"
-#include "../std/scoped_ptr.hpp"
#include "../std/string.hpp"
#include "../std/unordered_set.hpp"
#include "../std/vector.hpp"
diff --git a/storage/guides.hpp b/storage/guides.hpp
index bd3c4970e5..b230cc398d 100644
--- a/storage/guides.hpp
+++ b/storage/guides.hpp
@@ -5,7 +5,7 @@
#include "../std/string.hpp"
#include "../std/map.hpp"
#include "../std/set.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
#include "../std/noncopyable.hpp"
#include "../3party/jansson/jansson_handle.hpp"
@@ -73,7 +73,7 @@ private:
/// Loaded Guides json version
int m_version;
- scoped_ptr<downloader::HttpRequest> m_httpRequest;
+ unique_ptr<downloader::HttpRequest> m_httpRequest;
//@}
};
diff --git a/storage/storage.hpp b/storage/storage.hpp
index 2693e7d876..f601512d50 100644
--- a/storage/storage.hpp
+++ b/storage/storage.hpp
@@ -12,7 +12,7 @@
#include "../std/string.hpp"
#include "../std/set.hpp"
#include "../std/function.hpp"
-#include "../std/scoped_ptr.hpp"
+#include "../std/unique_ptr.hpp"
namespace storage
{
@@ -32,7 +32,7 @@ namespace storage
class Storage
{
/// We support only one simultaneous request at the moment
- scoped_ptr<downloader::HttpRequest> m_request;
+ unique_ptr<downloader::HttpRequest> m_request;
/// stores timestamp for update checks
int64_t m_currentVersion;
diff --git a/storage/storage_tests/country_info_test.cpp b/storage/storage_tests/country_info_test.cpp
index d6cae2aa51..586bb40fb7 100644
--- a/storage/storage_tests/country_info_test.cpp
+++ b/storage/storage_tests/country_info_test.cpp
@@ -25,7 +25,7 @@ namespace
UNIT_TEST(CountryInfo_GetByPoint_Smoke)
{
- scoped_ptr<CountryInfoT> getter(GetCountryInfo());
+ unique_ptr<CountryInfoT> const getter(GetCountryInfo());
// Minsk
CountryInfo info;
@@ -68,7 +68,7 @@ UNIT_TEST(CountryInfo_ValidName_Smoke)
UNIT_TEST(CountryInfo_SomeRects)
{
- scoped_ptr<CountryInfoT> getter(GetCountryInfo());
+ unique_ptr<CountryInfoT> const getter(GetCountryInfo());
m2::RectD rects[3];
getter->CalcUSALimitRect(rects);