Simplify cast
Use std::{size,ptrdiff}_t instead of std::{u,}intptr_t where appropriate