From 3f9bdce467c7525274b2a9fe96a290379f33ec42 Mon Sep 17 00:00:00 2001 From: Alexandra Heuschling Date: Tue, 17 Nov 2020 21:26:43 +0100 Subject: [PATCH] add check for types --- src/OpenMesh/Core/IO/writer/OMWriter.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/OpenMesh/Core/IO/writer/OMWriter.cc b/src/OpenMesh/Core/IO/writer/OMWriter.cc index 5951c546..2095567f 100644 --- a/src/OpenMesh/Core/IO/writer/OMWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OMWriter.cc @@ -621,7 +621,7 @@ size_t _OMWriter_::store_binary_custom_chunk(std::ostream& _os, bytes += store( _os, OMFormat::Chunk::PropertyName(_bp.name()), _swap ); // 3. data type - OMFormat::Chunk::PropertyType type = OMFormat::Chunk::PropertyType::UnknownType; + OMFormat::Chunk::PropertyName type = OMFormat::Chunk::PropertyName("unknown"); OpenMesh::PropertyT* bp_bool = dynamic_cast*>(&_bp); OpenMesh::PropertyT* bp_char = dynamic_cast* >(&_bp); @@ -637,27 +637,27 @@ size_t _OMWriter_::store_binary_custom_chunk(std::ostream& _os, //choose one of both tests if(_bp.internal_type_name() == get_type_name() || bp_bool != nullptr) - type = OMFormat::Chunk::PropertyType::BoolType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_char != nullptr) - type = OMFormat::Chunk::PropertyType::CharType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_double != nullptr) - type = OMFormat::Chunk::PropertyType::DoubleType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_float != nullptr) - type = OMFormat::Chunk::PropertyType::FloatType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_int != nullptr) - type = OMFormat::Chunk::PropertyType::IntType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_long != nullptr) - type = OMFormat::Chunk::PropertyType::LongType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_short != nullptr) - type = OMFormat::Chunk::PropertyType::ShortType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_uchar != nullptr) - type = OMFormat::Chunk::PropertyType::UCharType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_uint != nullptr) - type = OMFormat::Chunk::PropertyType::UIntType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name() || bp_ulong != nullptr) - type = OMFormat::Chunk::PropertyType::ULongType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string()); else if(_bp.internal_type_name() == get_type_name>() || bp_vecdouble != nullptr) - type = OMFormat::Chunk::PropertyType::VecDoubleType; + type = OMFormat::Chunk::PropertyName(OMFormat::get_type_string>()); bytes += store(_os, type, _swap);