make enum SegmentType an unsigned short

more work would be needed to make it an enum class, unfortunatly, as it
is used as flags