diff options
author | vng <viktor.govako@gmail.com> | 2015-07-17 17:27:55 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:57:15 +0300 |
commit | 5399343271ccb738d2624fb25250ba3e9694e21c (patch) | |
tree | 164387f96c2c8a2b8d6e704fe3d74db2d2d8560f /indexer/features_vector.hpp | |
parent | 6b9892d72ad0bbe54a7a7f7ef7664e517c8d54fc (diff) |
Review fixes.
Diffstat (limited to 'indexer/features_vector.hpp')
-rw-r--r-- | indexer/features_vector.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indexer/features_vector.hpp b/indexer/features_vector.hpp index 3c63fc3833..53d8c46d66 100644 --- a/indexer/features_vector.hpp +++ b/indexer/features_vector.hpp @@ -20,20 +20,20 @@ public: { } - void GetByIndex(uint32_t ind, FeatureType & ft) const; + void GetByIndex(uint32_t index, FeatureType & ft) const; - template <class ToDo> void ForEach(ToDo toDo) const + template <class ToDo> void ForEach(ToDo && toDo) const { - uint32_t ind = 0; + uint32_t index = 0; m_RecordReader.ForEachRecord([&] (uint32_t pos, char const * data, uint32_t /*size*/) { FeatureType ft; ft.Deserialize(m_LoadInfo.GetLoader(), data); - toDo(ft, m_table ? ind++ : pos); + toDo(ft, m_table ? index++ : pos); }); } - template <class ToDo> static void ForEachOffset(ModelReaderPtr reader, ToDo toDo) + template <class ToDo> static void ForEachOffset(ModelReaderPtr reader, ToDo && toDo) { VarRecordReader<ModelReaderPtr, &VarRecordSizeReaderVarint> recordReader(reader, 256); recordReader.ForEachRecord([&] (uint32_t pos, char const * /*data*/, uint32_t /*size*/) @@ -43,11 +43,11 @@ public: } private: + friend class FeaturesVectorTest; + feature::SharedLoadInfo m_LoadInfo; VarRecordReader<FilesContainerR::ReaderT, &VarRecordSizeReaderVarint> m_RecordReader; mutable vector<char> m_buffer; - - friend class FeaturesVectorTest; feature::FeaturesOffsetsTable const * m_table; }; |