C-style cast cleanup III

This commit is contained in:
Nekotekina 2019-11-30 02:11:28 +03:00
parent ad9c9f0183
commit 28eacc616a
18 changed files with 143 additions and 94 deletions

View file

@ -140,12 +140,12 @@ namespace utils
// other after this
if (other.start > end)
{
return (s32)(other.start - end - 1);
return static_cast<s32>(other.start - end - 1);
}
// this after other
AUDIT(start > other.end);
return -((s32)(start - other.end - 1));
return -static_cast<s32>(start - other.end - 1);
}
u32 distance(const address_range &other) const
@ -577,7 +577,8 @@ namespace utils
} // namespace utils
namespace std {
namespace std
{
static_assert(sizeof(size_t) >= 2 * sizeof(u32), "size_t must be at least twice the size of u32");
template <>