- if(data_type==UNSIGNED_BYTE && t==UNSIGNED_SHORT)
- expand<unsigned char, unsigned short>(data);
- else if(data_type==UNSIGNED_BYTE && t==UNSIGNED_INT)
- expand<unsigned char, unsigned>(data);
- else if(data_type==UNSIGNED_SHORT && t==UNSIGNED_INT)
- expand<unsigned short, unsigned>(data);
- else if(data_type==UNSIGNED_INT && t==UNSIGNED_BYTE)
- shrink<unsigned, unsigned char>(data);
- else if(data_type==UNSIGNED_INT && t==UNSIGNED_SHORT)
- shrink<unsigned, unsigned short>(data);
- else if(data_type==UNSIGNED_SHORT && t==UNSIGNED_BYTE)
- shrink<unsigned short, unsigned char>(data);
-
- data_type = t;
+ if(index_type==UNSIGNED_SHORT && t==UNSIGNED_INT)
+ expand<UInt16, UInt32>(data);
+ else if(index_type==UNSIGNED_INT && t==UNSIGNED_SHORT)
+ shrink<UInt32, UInt16>(data);
+
+ index_type = t;