mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 03:12:41 +01:00
Codechange: Replace C-style casts to size_t with static_cast. (#12455)
* Codechange: Replace C-style casts to size_t with static_cast. This touches only simple value-type casts. * Codechange: Replace static_cast<size_t>(-1) with SIZE_MAX Co-authored-by: Rubidium <rubidium@openttd.org>
This commit is contained in:
@@ -340,7 +340,7 @@ void TextfileWindow::CheckHyperlinkClick(Point pt)
|
||||
/* Found character index in line, check if any links are at that position. */
|
||||
for (const auto &link : found_links) {
|
||||
Debug(misc, 4, "Checking link from char {} to {}", link.begin, link.end);
|
||||
if ((size_t)char_index >= link.begin && (size_t)char_index < link.end) {
|
||||
if (static_cast<size_t>(char_index) >= link.begin && static_cast<size_t>(char_index) < link.end) {
|
||||
Debug(misc, 4, "Activating link with destination: {}", link.destination);
|
||||
this->OnHyperlinkClick(link);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user