mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 19:54:06 +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:
@@ -202,7 +202,7 @@ void IniLoadFile::LoadFromDisk(const std::string &filename, Subdirectory subdir)
|
||||
end += ftell(in);
|
||||
|
||||
/* for each line in the file */
|
||||
while ((size_t)ftell(in) < end && fgets(buffer, sizeof(buffer), in)) {
|
||||
while (static_cast<size_t>(ftell(in)) < end && fgets(buffer, sizeof(buffer), in)) {
|
||||
char c, *s;
|
||||
/* trim whitespace from the left side */
|
||||
for (s = buffer; *s == ' ' || *s == '\t'; s++) {}
|
||||
|
||||
Reference in New Issue
Block a user