Commit 70c0123b authored by Jan Möbius's avatar Jan Möbius
Browse files

PLY: add short/ushort support to readInteger.

parent d28df7ed
...@@ -976,6 +976,8 @@ void _PLYReader_::readInteger(ValueType _type, std::istream& _in, T& _value) con ...@@ -976,6 +976,8 @@ void _PLYReader_::readInteger(ValueType _type, std::istream& _in, T& _value) con
static_assert(std::is_integral<T>::value, "Integral required."); static_assert(std::is_integral<T>::value, "Integral required.");
int16_t tmp_int16_t;
uint16_t tmp_uint16_t;
int32_t tmp_int32_t; int32_t tmp_int32_t;
uint32_t tmp_uint32_t; uint32_t tmp_uint32_t;
int8_t tmp_char; int8_t tmp_char;
...@@ -983,6 +985,22 @@ void _PLYReader_::readInteger(ValueType _type, std::istream& _in, T& _value) con ...@@ -983,6 +985,22 @@ void _PLYReader_::readInteger(ValueType _type, std::istream& _in, T& _value) con
switch (_type) { switch (_type) {
case ValueTypeINT16:
case ValueTypeSHORT:
restore(_in, tmp_int16_t, options_.check(Options::MSB));
_value = tmp_int16_t;
case ValueTypeUINT16:
case ValueTypeUSHORT:
restore(_in, tmp_uint16_t, options_.check(Options::MSB));
_value = tmp_uint16_t;
case ValueTypeINT: case ValueTypeINT:
case ValueTypeINT32: case ValueTypeINT32:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment