mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Use C++-sryle static_cast, not C-style explicit cast
`uint32_t(param)` is actually functional notation of explicit casting,
not a direct constructor call. `uint32_t{param}` would be uniform
initialization syntax for a constructor call, but would not allow
narrowing from `uint64_t`. See issue #1904 for discussion.
This commit is contained in:
+1
-1
@@ -76,5 +76,5 @@ std::pair<WarningState, std::optional<uint32_t>> getInitialWarningState(std::str
|
||||
}
|
||||
}
|
||||
|
||||
return {state, param > UINT32_MAX ? UINT32_MAX : uint32_t(param)};
|
||||
return {state, param > UINT32_MAX ? UINT32_MAX : static_cast<uint32_t>(param)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user