Skip to content
Snippets Groups Projects
Commit 2a6af5db authored by LJ Sonic's avatar LJ Sonic
Browse files

Merge branch 'simplify-cmpack' into 'next'

Simplify cmpack

See merge request STJr/SRB2!2586
parents 74df6cf5 e4819f64
No related branches found
No related tags found
1 merge request!2586Simplify cmpack
Pipeline #8179 passed
......@@ -186,13 +186,9 @@ static node_t nodes[MAXNETNODES];
// 0 if a = n (mod 256)
// >0 if a > b (mod 256)
// mnemonic: to use it compare to 0: cmpack(a,b)<0 is "a < b" ...
FUNCMATH static INT32 cmpack(UINT8 a, UINT8 b)
FUNCMATH static inline INT32 cmpack(UINT8 a, UINT8 b)
{
register INT32 d = a - b;
if (d >= 127 || d < -128)
return -d;
return d;
return (SINT8)(a - b);
}
/** Sets freeack to a free acknum and copies the netbuffer in the ackpak table
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment