Fix narrowing warnings on MSVC

This commit is contained in:
Jonathan G Rennison
2024-01-05 22:51:25 +00:00
parent b23077b08c
commit a33544ee17
2 changed files with 2 additions and 2 deletions

View File

@@ -603,7 +603,7 @@ struct NewGRFInspectWindow : Window {
if (iter != lines.end() && iter->first == (int)highlight_tag) {
/* Already stored, don't insert again */
} else {
lines.insert(iter, std::make_pair<int, uint16>(highlight_tag, std::min<uint>(UINT16_MAX, i)));
lines.insert(iter, std::make_pair<int, uint16>(highlight_tag, ClampTo<uint16>(i)));
}
}