This cast seems mostly superflous now, since Seek::SET etc. is defined to be SEEK_SET etc. now. The important bits are the input validation here (i.e. that origin is always one of SEEK_SET, SEEK_CUR or SEEK_END). Moving that to common/ might be a slightly over engineered since a simple "origin != Seek::SET && origin != Seek::CUR && origin != Seek::END" check at the places where it is required should be clear enough.