First step to xcode 4.3 compatibility

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@551 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2012-03-02 14:46:15 +00:00
parent d44c4bedf7
commit a28d019323
2 changed files with 16 additions and 26 deletions

View File

@@ -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 <typename T>
inline
unsigned int bits(const T& val)
{
return is_integer(val)
? (static_cast<unsigned int>(integer_size(val)))
: (static_cast<unsigned int>(float_size(val)));
}
// Convert size of type to Integer_Size
#ifdef NDEBUG
template <typename T> 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 <typename T>
inline
unsigned int bits(const T& val)
{
return is_integer(val)
? (static_cast<unsigned int>(integer_size(val)))
: (static_cast<unsigned int>(float_size(val)));
}
// -------------------- create/read version
inline uint8 mk_version(const uint16 major, const uint16 minor)