39 return static_cast<OPJ_OFF_T>(-1);
46 return static_cast<OPJ_OFF_T>(-1);
48 auto unsigned_nb_bytes =
49 static_cast<std::make_unsigned<OPJ_OFF_T>::type>(nb_bytes);
52 if (unsigned_nb_bytes >
53 std::numeric_limits<OPJ_SIZE_T>::max() - srcData
->offset) {
56 OPJ_SIZE_T checked_nb_bytes =
static_cast<OPJ_SIZE_T>(unsigned_nb_bytes);