mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants: `umax` returns max number, restricted to unsigned. `smax` returns max signed number, restricted to integrals. `smin` returns min signed number, restricted to signed. `amin` returns smin or zero, less restricted. `amax` returns smax or umax, less restricted. Fix operators == and <=> for synthesized rel-ops.
This commit is contained in:
parent
613777afde
commit
160b131de3
38 changed files with 219 additions and 111 deletions
|
|
@ -913,7 +913,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
|||
}
|
||||
case CELL_SAVEDATA_FOCUSPOS_LATEST:
|
||||
{
|
||||
s64 max = INT64_MIN;
|
||||
s64 max = smin;
|
||||
|
||||
for (u32 i = 0; i < save_entries.size(); i++)
|
||||
{
|
||||
|
|
@ -928,7 +928,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
|||
}
|
||||
case CELL_SAVEDATA_FOCUSPOS_OLDEST:
|
||||
{
|
||||
s64 min = INT64_MAX;
|
||||
s64 min = smax;
|
||||
|
||||
for (u32 i = 0; i < save_entries.size(); i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue