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:
authorMaxim Pimenov <m@maps.me>2015-11-10 15:14:21 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:02:43 +0300
commitc0acca8e4138c18d6455de23f810930c5d7b03aa (patch)
treef871d23c651be268796d81a464dfd98e1b241545 /indexer/trie.hpp
parentef97e8dbaf2356802381e96ef0f4ce61bced7616 (diff)
Review fixes.
Diffstat (limited to 'indexer/trie.hpp')
-rw-r--r--indexer/trie.hpp34
1 files changed, 3 insertions, 31 deletions
diff --git a/indexer/trie.hpp b/indexer/trie.hpp
index ae7efd0af0..40031360cb 100644
--- a/indexer/trie.hpp
+++ b/indexer/trie.hpp
@@ -8,12 +8,12 @@
namespace trie
{
-typedef uint32_t TrieChar;
+using TrieChar = uint32_t;
// 95 is a good value for the default baseChar, since both small and capital latin letters
// are less than +/- 32 from it and thus can fit into supershort edge.
// However 0 is used because the first byte is actually language id.
-static uint32_t const DEFAULT_CHAR = 0;
+uint32_t constexpr kDefaultChar = 0;
template <typename TValueList>
class Iterator
@@ -32,40 +32,12 @@ public:
buffer_vector<Edge, 8> m_edge;
TValueList m_valueList;
- virtual ~Iterator() {}
+ virtual ~Iterator() = default;
virtual unique_ptr<Iterator<TValueList>> Clone() const = 0;
virtual unique_ptr<Iterator<TValueList>> GoToEdge(size_t i) const = 0;
};
-struct EmptyValueReader
-{
- typedef unsigned char ValueType;
-
- EmptyValueReader() = default;
-
- template <typename SourceT>
- void operator()(SourceT &, ValueType & value) const
- {
- value = 0;
- }
-};
-
-template <unsigned int N>
-struct FixedSizeValueReader
-{
- struct ValueType
- {
- unsigned char m_data[N];
- };
-
- template <typename SourceT>
- void operator()(SourceT & src, ValueType & value) const
- {
- src.Read(&value.m_data[0], N);
- }
-};
-
template <typename TValueList, typename TF, typename TString>
void ForEachRef(Iterator<TValueList> const & it, TF && f, TString const & s)
{