From e7ed1ca1e0b149bd6279862693213da4da79cf1d Mon Sep 17 00:00:00 2001 From: Martin Schultz Date: Thu, 14 Apr 2016 12:52:21 +0200 Subject: [PATCH] fixes #17 by removing the swap of len in string serialization specification --- src/OpenMesh/Core/IO/SR_binary_spec.hh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/OpenMesh/Core/IO/SR_binary_spec.hh b/src/OpenMesh/Core/IO/SR_binary_spec.hh index 25e2a1e6..956b6e8f 100644 --- a/src/OpenMesh/Core/IO/SR_binary_spec.hh +++ b/src/OpenMesh/Core/IO/SR_binary_spec.hh @@ -238,8 +238,6 @@ template <> struct binary< std::string > { { length_t len = length_t(_v.size()); - if (_swap) reverse_byte_order(len); - size_t bytes = binary::store( _os, len, _swap ); _os.write( _v.data(), len ); return _os.good() ? len+bytes : 0; @@ -252,8 +250,6 @@ template <> struct binary< std::string > { { length_t len; size_t bytes = binary::restore( _is, len, _swap ); - if (_swap) - reverse_byte_order(len); _val.resize(len); _is.read( const_cast(_val.data()), len );