1
0
Fork 0
forked from eden-emu/eden

remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency

Signed-off-by: arades79 <scravers@protonmail.com>
This commit is contained in:
arades79 2023-02-14 11:13:47 -05:00
parent 3e078dbb07
commit 60a68839ee
102 changed files with 300 additions and 307 deletions

View file

@ -42,7 +42,7 @@ Id EmitIAdd32(EmitContext& ctx, IR::Inst* inst, Id a, Id b) {
SetSignFlag(ctx, inst, result);
if (IR::Inst * overflow{inst->GetAssociatedPseudoOperation(IR::Opcode::GetOverflowFromOp)}) {
// https://stackoverflow.com/questions/55468823/how-to-detect-integer-overflow-in-c
constexpr static u32 s32_max{static_cast<u32>(std::numeric_limits<s32>::max())};
constexpr u32 s32_max{static_cast<u32>(std::numeric_limits<s32>::max())};
const Id is_positive{ctx.OpSGreaterThanEqual(ctx.U1, a, ctx.u32_zero_value)};
const Id sub_a{ctx.OpISub(ctx.U32[1], ctx.Const(s32_max), a)};