diff --git a/src/OpenMesh/Core/IO/OMFormat.hh b/src/OpenMesh/Core/IO/OMFormat.hh index 6f221931..14fafc0a 100644 --- a/src/OpenMesh/Core/IO/OMFormat.hh +++ b/src/OpenMesh/Core/IO/OMFormat.hh @@ -384,17 +384,6 @@ namespace OMFormat { // calc minimum (power-of-2) number of bits needed Chunk::Integer_Size needed_bits( size_t s ); - - // Return the storage type (Chunk::Header::bits_) - template - inline - unsigned int bits(const T& val) - { - return is_integer(val) - ? (static_cast(integer_size(val))) - : (static_cast(float_size(val))); - } - // Convert size of type to Integer_Size #ifdef NDEBUG template Chunk::Integer_Size integer_size(const T&) @@ -433,6 +422,16 @@ namespace OMFormat { return Chunk::Float_Size(0); } + // Return the storage type (Chunk::Header::bits_) + template + inline + unsigned int bits(const T& val) + { + return is_integer(val) + ? (static_cast(integer_size(val))) + : (static_cast(float_size(val))); + } + // -------------------- create/read version inline uint8 mk_version(const uint16 major, const uint16 minor) diff --git a/src/OpenMesh/Core/IO/SR_rbo.hh b/src/OpenMesh/Core/IO/SR_rbo.hh index abef7a21..a7ae9e36 100644 --- a/src/OpenMesh/Core/IO/SR_rbo.hh +++ b/src/OpenMesh/Core/IO/SR_rbo.hh @@ -87,12 +87,7 @@ namespace IO { function body which will result in a linker error */ template < size_t N > inline -void _reverse_byte_order_N(uint8_t* _val) -{ - assert_compile(false); -// compile_time_error__only_for_fundamental_types(_val); -} - +void _reverse_byte_order_N(uint8_t* _val); template <> inline void _reverse_byte_order_N<1>(uint8_t* /*_val*/) { } @@ -150,15 +145,11 @@ void _reverse_byte_order_N<16>(uint8_t* _val) // reverting pointers makes no sense, hence forbid it. /** this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error */ -template inline T* reverse_byte_order(T* t) -{ - // Should never reach this point. If so, then some operator were not - // overloaded. Especially check for IO::binary<> specialization on - // custom data types. -// compile_time_error__cannot_do_that(a); - assert_compile(false); - return t; -} +template inline T* reverse_byte_order(T* t); +// Should never reach this point. If so, then some operator were not +// overloaded. Especially check for IO::binary<> specialization on +// custom data types. + inline void compile_time_error__no_fundamental_type() {