From bf55b5854b1161ca805c8883bc9f438ad645e1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 26 Oct 2012 15:18:23 +0200 Subject: [PATCH] TypeTraits: Default inheritance type for structs is public. Simplified already too long lines. --- src/Math/MathTypeTraits.h | 20 ++++++++++---------- src/TypeTraits.h | 40 +++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/Math/MathTypeTraits.h b/src/Math/MathTypeTraits.h index 4bf013937..53413f4ae 100644 --- a/src/Math/MathTypeTraits.h +++ b/src/Math/MathTypeTraits.h @@ -126,49 +126,49 @@ template<> struct MathTypeTraitsLong<8> { } -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::uint32_t NumericType; typedef float FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::int32_t NumericType; typedef float FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::uint32_t NumericType; typedef float FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::int32_t NumericType; typedef float FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::uint32_t NumericType; typedef double FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::int32_t NumericType; typedef double FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::uint64_t NumericType; typedef long double FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsIntegral { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsIntegral { typedef std::int64_t NumericType; typedef long double FloatingPointType; }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsFloatingPoint { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsFloatingPoint { typedef float NumericType; typedef float FloatingPointType; inline constexpr static float epsilon() { return FLOAT_EQUALITY_PRECISION; } }; -template<> struct MathTypeTraits: public Implementation::MathTypeTraitsFloatingPoint { +template<> struct MathTypeTraits: Implementation::MathTypeTraitsFloatingPoint { typedef float NumericType; typedef double FloatingPointType; diff --git a/src/TypeTraits.h b/src/TypeTraits.h index ba53cb79b..e134e7b9d 100644 --- a/src/TypeTraits.h +++ b/src/TypeTraits.h @@ -42,7 +42,7 @@ Where it makes sense, this class extends Math::MathTypeTraits with OpenGL-specific traits. */ #ifdef DOXYGEN_GENERATING_OUTPUT -template struct TypeTraits: public Math::MathTypeTraits { +template struct TypeTraits: Math::MathTypeTraits { /** * @brief Corresponding type for vertex attributes * @@ -176,7 +176,7 @@ template<> struct TypeOf { typedef GLfloat Type; }; template<> struct TypeOf { typedef GLdouble Type; }; #endif -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { /* Can not be used for attributes */ inline constexpr static Type type() { return Type::UnsignedByte; } inline constexpr static Type indexType() { return Type::UnsignedByte; } @@ -185,7 +185,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits inline constexpr static std::size_t count() { return 1; } }; -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { /* Can not be used for attributes */ inline constexpr static Type type() { return Type::Byte; } /* Can not be used for indices */ @@ -194,7 +194,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits { inline constexpr static std::size_t count() { return 1; } }; -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { /* Can not be used for attributes */ inline constexpr static Type type() { return Type::UnsignedShort; } inline constexpr static Type indexType() { return Type::UnsignedShort; } @@ -203,7 +203,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { /* Can not be used for attributes */ inline constexpr static Type type() { return Type::Short; } /* Can not be used for indices */ @@ -212,7 +212,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits inline constexpr static std::size_t count() { return 1; } }; -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { typedef GLuint AttributeType; inline constexpr static Type type() { return Type::UnsignedInt; } inline constexpr static Type indexType() { return Type::UnsignedInt; } @@ -221,7 +221,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits inline constexpr static std::size_t count() { return 1; } }; -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { typedef GLint AttributeType; inline constexpr static Type type() { return Type::Int; } /* Can not be used for indices */ @@ -230,7 +230,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits { inline constexpr static std::size_t count() { return 1; } }; -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { typedef GLfloat AttributeType; inline constexpr static Type type() { return Type::Float; } /* Can not be used for indices */ @@ -240,7 +240,7 @@ template<> struct TypeTraits: public Math::MathTypeTraits { }; #ifndef MAGNUM_TARGET_GLES -template<> struct TypeTraits: public Math::MathTypeTraits { +template<> struct TypeTraits: Math::MathTypeTraits { typedef GLdouble AttributeType; inline constexpr static Type type() { return Type::Double; } /* Can not be used for indices */ @@ -282,7 +282,7 @@ namespace Implementation { #endif } -template struct TypeTraits>: public Implementation::VectorTypeTraits {}; +template struct TypeTraits>: Implementation::VectorTypeTraits {}; /* Only some vectors can be used as attributes */ template struct TypeTraits>: Implementation::VectorTypeTraits<1, T>, Implementation::VectorAttributeType {}; @@ -290,13 +290,13 @@ template struct TypeTraits>: Implementation::VectorT template struct TypeTraits>: Implementation::VectorTypeTraits<3, T>, Implementation::VectorAttributeType {}; template struct TypeTraits>: Implementation::VectorTypeTraits<4, T>, Implementation::VectorAttributeType {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; namespace Implementation { template struct MatrixTypeTraits { @@ -322,7 +322,7 @@ namespace Implementation { #endif } -template struct TypeTraits>: public Implementation::MatrixTypeTraits {}; +template struct TypeTraits>: Implementation::MatrixTypeTraits {}; /* Only some floating-point matrices can be used as attributes */ template struct TypeTraits>: Implementation::MatrixTypeTraits<2, 2, T>, Implementation::MatrixAttributeType {}; @@ -337,8 +337,8 @@ template struct TypeTraits>: Implement template struct TypeTraits>: TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; -template struct TypeTraits>: public TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; +template struct TypeTraits>: TypeTraits> {}; #endif }