Removed ugly define

This commit is contained in:
Jan Möbius
2023-08-23 11:42:24 +02:00
parent f78dda1de7
commit 46a445cdaa

View File

@@ -80,11 +80,6 @@ namespace IO {
//-----------------------------------------------------------------------------
// struct binary, helper for storing/restoring
#define X \
std::ostringstream msg; \
msg << "Type not supported: " << typeid(value_type).name(); \
throw std::logic_error(msg.str())
/// \struct binary SR_binary.hh <OpenMesh/Core/IO/SR_binary.hh>
///
/// The struct defines how to store and restore the type T.
@@ -119,7 +114,11 @@ template < typename T, typename = void > struct binary
const value_type& /* _v */,
bool /* _swap */ = false ,
bool /* store_size */ = true ) // for vectors
{ X; return 0; }
{
std::ostringstream msg;
msg << "Type not supported: " << typeid(value_type).name();
throw std::logic_error(msg.str());
}
/// Restore a value of T and return the number of bytes read
static
@@ -127,7 +126,11 @@ template < typename T, typename = void > struct binary
value_type& /* _v */,
bool /* _swap */ = false ,
bool /* store_size */ = true ) // for vectors
{ X; return 0; }
{
std::ostringstream msg;
msg << "Type not supported: " << typeid(value_type).name();
throw std::logic_error(msg.str());
}
};
#undef X