Review fixes.

This commit is contained in:
Maxim Pimenov 2018-07-02 13:42:55 +03:00 committed by Tatiana Yan
parent 9f8508bb7b
commit 2d1d5be066
3 changed files with 9 additions and 6 deletions

View file

@ -10,6 +10,7 @@
#include <algorithm>
#include <cstdint>
#include <utility>
#include <vector>
namespace search

View file

@ -17,6 +17,7 @@
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
namespace search
@ -83,6 +84,12 @@ public:
}
private:
template <typename Sink>
static uint32_t RelativePos(Sink & sink, uint64_t startPos)
{
return ::base::checked_cast<uint32_t>(sink.Pos() - startPos);
}
void SortPostings();
void BuildDictionary();
@ -166,12 +173,6 @@ private:
}
}
template <typename Sink>
static uint32_t RelativePos(Sink & sink, uint64_t startPos)
{
return ::base::checked_cast<uint32_t>(sink.Pos() - startPos);
}
std::map<Token, std::vector<Posting>> m_postingsByToken;
TextIndexDictionary m_dictionary;
};

View file

@ -11,6 +11,7 @@
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
namespace search