mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Remove unnecessary uses of Abs()
Use C standard abs() or fabs() instead. Reviewed-by: Zhang Mingli <zmlpostgres@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
This commit is contained in:
@ -426,7 +426,7 @@ gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
|
||||
tmp[1] = (unsigned char) (((VARSIZE(uk.lower) - VARHDRSZ) <= ul) ? 0 : (VARDATA(uk.lower)[ul]));
|
||||
tmp[2] = (unsigned char) (((VARSIZE(ok.upper) - VARHDRSZ) <= ul) ? 0 : (VARDATA(ok.upper)[ul]));
|
||||
tmp[3] = (unsigned char) (((VARSIZE(uk.upper) - VARHDRSZ) <= ul) ? 0 : (VARDATA(uk.upper)[ul]));
|
||||
dres = Abs(tmp[0] - tmp[1]) + Abs(tmp[3] - tmp[2]);
|
||||
dres = abs(tmp[0] - tmp[1]) + abs(tmp[3] - tmp[2]);
|
||||
dres /= 256.0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user