forked from organicmaps/organicmaps
[msvc] Fix signed\unsigned warnings.
This commit is contained in:
parent
a6d052575b
commit
2d95d842c6
3 changed files with 5 additions and 5 deletions
|
@ -244,12 +244,12 @@ void Build(SinkT & sink, IterT const beg, IterT const end, EdgeBuilderT const &
|
|||
TrieChar const * const pKeyData = it->GetKeyData();
|
||||
TrieString key(pKeyData, pKeyData + it->GetKeySize());
|
||||
CHECK(!(key < prevKey), (key, prevKey));
|
||||
int nCommon = 0;
|
||||
size_t nCommon = 0;
|
||||
while (nCommon < min(key.size(), prevKey.size()) && prevKey[nCommon] == key[nCommon])
|
||||
++nCommon;
|
||||
builder::PopNodes(sink, nodes, nodes.size() - nCommon - 1); // Root is also a common node.
|
||||
uint64_t const pos = sink.Pos();
|
||||
for (int i = nCommon; i < key.size(); ++i)
|
||||
for (size_t i = nCommon; i < key.size(); ++i)
|
||||
nodes.push_back(builder::NodeInfo<EdgeBuilderT>(pos, key[i], edgeBuilder));
|
||||
uint8_t const * const pValue = static_cast<uint8_t const *>(it->GetValueData());
|
||||
nodes.back().m_values.insert(nodes.back().m_values.end(), pValue, pValue + it->GetValueSize());
|
||||
|
|
|
@ -153,7 +153,7 @@ private:
|
|||
|
||||
// [1: header]: [1: isLeaf] [1: isShortEdge] [6: (edgeChar0 - baseChar) or min(edgeLen-1, 63)]
|
||||
uint8_t const header = ReadPrimitiveFromSource<uint8_t>(src);
|
||||
m_edgeInfo[i].m_isLeaf = (header & 128);
|
||||
m_edgeInfo[i].m_isLeaf = ((header & 128) != 0);
|
||||
if (header & 64)
|
||||
e.m_str.push_back(baseChar + bits::ZigZagDecode(header & 63U));
|
||||
else
|
||||
|
|
|
@ -86,7 +86,7 @@ struct FeatureProcessor
|
|||
uint32_t keywordsSkipMask = 0;
|
||||
FeatureType::GetTypesFn types;
|
||||
feature.ForEachTypeRef(types);
|
||||
for (int i = 0; i < types.m_size; ++i)
|
||||
for (size_t i = 0; i < types.m_size; ++i)
|
||||
keywordsSkipMask |= m_query.GetKeywordsToSkipForType(types.m_types[i]);
|
||||
|
||||
vector<strings::UniString> const & queryKeywords = m_query.GetKeywords();
|
||||
|
@ -189,7 +189,7 @@ void Query::Search(function<void (Result const &)> const & f)
|
|||
SplitUniString(NormalizeAndSimplifyString(iName->m_name),
|
||||
MakeBackInsertFunctor(tokens),
|
||||
Delimiters());
|
||||
int const n = tokens.size();
|
||||
size_t const n = tokens.size();
|
||||
if (m_keywords.size() >= n)
|
||||
{
|
||||
if (equal(tokens.begin(), tokens.end(), m_keywords.begin()))
|
||||
|
|
Loading…
Add table
Reference in a new issue