added explicit cast to omit [-Wconversion] warning
* removed useless comparison: if (int8_t t >= 255) ...
* revealed by -Wtype-limits
* saved 6 bytes