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:
authorSergey Magidovich <mgsergio@mapswithme.com>2016-02-28 22:33:38 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:49:24 +0300
commit4a3989ff23d90c112b50f690e7a2c2329aa54389 (patch)
tree6c4476e3d423686acbf55f180c39abb55561b929 /coding/buffer_reader.hpp
parent78fb143a7901288395d5cc70b0aa4e0b9ff707fc (diff)
Platform::GetReader returns unique_ptr. Fix leaks.
Diffstat (limited to 'coding/buffer_reader.hpp')
-rw-r--r--coding/buffer_reader.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/coding/buffer_reader.hpp b/coding/buffer_reader.hpp
index 8c99d644d1..c35911a29a 100644
--- a/coding/buffer_reader.hpp
+++ b/coding/buffer_reader.hpp
@@ -40,9 +40,10 @@ public:
return BufferReader(*this, pos, size);
}
- inline BufferReader * CreateSubReader(uint64_t pos, uint64_t size) const
+ inline unique_ptr<Reader> CreateSubReader(uint64_t pos, uint64_t size) const
{
- return new BufferReader(*this, pos, size);
+ // Can't use make_unique with private constructor.
+ return unique_ptr<Reader>(new BufferReader(*this, pos, size));
}
private: