mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
[base] Updated IsSortedAndUnique function.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
b7b87f5530
commit
7b4862b442
@@ -73,7 +73,7 @@ std::vector<uint32_t> const & FeaturesLayerMatcher::GetPlaceAddrFeatures(uint32_
|
||||
res.first.push_back(fid);
|
||||
});
|
||||
|
||||
ASSERT(base::IsSortedAndUnique(res.first.begin(), res.first.end()), ());
|
||||
ASSERT(base::IsSortedAndUnique(res.first), ());
|
||||
}
|
||||
return res.first;
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ int HouseDetector::LoadStreets(vector<FeatureID> const & ids)
|
||||
{
|
||||
// LOG(LDEBUG, ("IDs = ", ids));
|
||||
|
||||
ASSERT(base::IsSortedAndUnique(ids.begin(), ids.end()), ());
|
||||
ASSERT(base::IsSortedAndUnique(ids), ());
|
||||
|
||||
// Check if the cache is obsolete and need to be cleared.
|
||||
if (!m_id2st.empty())
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
vector<Id> StrictQuery(string const & query, string const & lang) const
|
||||
{
|
||||
auto prev = m_index.GetAllIds();
|
||||
TEST(base::IsSortedAndUnique(prev.cbegin(), prev.cend()), ());
|
||||
TEST(base::IsSortedAndUnique(prev), ());
|
||||
|
||||
ForEachNormalizedToken(query, [&](strings::UniString const & token)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user