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:
authorvng <viktor.govako@gmail.com>2015-07-16 14:31:31 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:57:12 +0300
commit8fdd97d52366659ec16cf4d4edf3ab98f96b0874 (patch)
tree1381c0061d93b5ee60b658df1659f3fa265312d0 /indexer/mwm_set.hpp
parent0dc6675aa5d9cc8e19f1ec02a927eae826d97944 (diff)
Minor refactoring to store feature’s offsets table once for every cache value in mwm set.
Diffstat (limited to 'indexer/mwm_set.hpp')
-rw-r--r--indexer/mwm_set.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indexer/mwm_set.hpp b/indexer/mwm_set.hpp
index 3195955529..a5663da83b 100644
--- a/indexer/mwm_set.hpp
+++ b/indexer/mwm_set.hpp
@@ -40,6 +40,7 @@ public:
};
MwmInfo();
+ virtual ~MwmInfo() = default;
m2::RectD m_limitRect; ///< Limit rect of mwm.
uint8_t m_minScale; ///< Min zoom level of mwm.
@@ -104,13 +105,13 @@ public:
};
public:
- explicit MwmSet(size_t cacheSize = 5);
- virtual ~MwmSet() = 0;
+ explicit MwmSet(size_t cacheSize = 5) : m_cacheSize(cacheSize) {}
+ virtual ~MwmSet() = default;
class MwmValueBase
{
public:
- virtual ~MwmValueBase() {}
+ virtual ~MwmValueBase() = default;
};
using TMwmValueBasePtr = shared_ptr<MwmValueBase>;
@@ -210,8 +211,8 @@ public:
protected:
/// @return True when file format version was successfully read to MwmInfo.
- virtual bool GetVersion(platform::LocalCountryFile const & localFile, MwmInfo & info) const = 0;
- virtual TMwmValueBasePtr CreateValue(platform::LocalCountryFile const & localFile) const = 0;
+ virtual MwmInfo * CreateInfo(platform::LocalCountryFile const & localFile) const = 0;
+ virtual MwmValueBase * CreateValue(MwmInfo & info) const = 0;
private:
typedef deque<pair<MwmId, TMwmValueBasePtr>> CacheType;