SQLite Forum

SQLITE_WITHIN macro with one compare operator
Login
Hello

This macro now looks like:

`#define SQLITE_WITHIN(P,S,E) (((uptr)(P)>=(uptr)(S))&&((uptr)(P)<(uptr)(E)))`

But it can also be rewritten as:

`#define SQLITE_WITHIN(P,S,E) ((uptr)((uptr)(P)-(uptr)(S))<((uptr)(E)-(uptr)(S)))`


Or is this UB ? 
I'm just curious, because this seems to be a bit faster..