[base] Updated IsSortedAndUnique function.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2025-07-03 20:01:54 -03:00
committed by Konstantin Pastbin
parent b7b87f5530
commit 7b4862b442
7 changed files with 12 additions and 12 deletions

View File

@@ -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;
}

View File

@@ -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())

View File

@@ -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)
{