Added ftype::Trunc.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2025-07-15 00:00:37 -03:00
committed by Konstantin Pastbin
parent 4e9efa63ff
commit 11ee2b121b
4 changed files with 11 additions and 14 deletions

View File

@@ -417,9 +417,7 @@ void FeatureParams::SetRwSubwayType(char const * cityName)
for (size_t i = 0; i < m_types.size(); ++i)
{
uint32_t t = m_types[i];
ftype::TruncValue(t, 2);
if (t == src)
if (ftype::Trunc(m_types[i], 2) == src)
{
m_types[i] = dest;
break;
@@ -492,9 +490,7 @@ uint32_t FeatureParams::FindType(uint32_t comp, uint8_t level) const
{
for (uint32_t const type : m_types)
{
uint32_t t = type;
ftype::TruncValue(t, level);
if (t == comp)
if (ftype::Trunc(type, level) == comp)
return type;
}
return ftype::GetEmptyValue();