From 7ffb04f0191ceaf810500ddc49556e7bf8b9d6d7 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 25 Oct 2017 23:23:41 -0300 Subject: [PATCH] Fix windows build --HG-- branch : minor --- src/modules/graphics/vertex.cpp | 2 -- src/modules/graphics/vertex.h | 28 +--------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/modules/graphics/vertex.cpp b/src/modules/graphics/vertex.cpp index 665406ffa..c16245ca5 100644 --- a/src/modules/graphics/vertex.cpp +++ b/src/modules/graphics/vertex.cpp @@ -37,8 +37,6 @@ static_assert(sizeof(XYf_STf_RGBAub) == sizeof(float)*2 + sizeof(float)*2 + size static_assert(sizeof(XYf_STus_RGBAub) == sizeof(float)*2 + sizeof(uint16)*2 + sizeof(Color), "sizeof(XYf_STus_RGBAub) incorrect!"); static_assert(sizeof(XYf_STPf_RGBAub) == sizeof(float)*2 + sizeof(float)*3 + sizeof(Color), "sizeof(XYf_STPf_RGBAub) incorrect!"); -static_assert(sizeof(AttributeInfo) == sizeof(uint64), "sizeof(AttributeInfo) incorrect!"); - size_t getFormatStride(CommonFormat format) { switch (format) diff --git a/src/modules/graphics/vertex.h b/src/modules/graphics/vertex.h index 505278fc7..b2d06ba07 100644 --- a/src/modules/graphics/vertex.h +++ b/src/modules/graphics/vertex.h @@ -212,11 +212,7 @@ struct Attributes uint32 enablebits = 0; uint32 instancebits = 0; - union - { - AttributeInfo attribs[MAX]; - uint64 data[MAX]; - }; + AttributeInfo attribs[MAX]; Attributes() {} Attributes(CommonFormat format, uint8 bufferindex) @@ -263,28 +259,6 @@ struct Attributes } void setCommonFormat(CommonFormat format, uint8 bufferindex); - - bool operator == (const Attributes &other) const - { - if (enablebits != other.enablebits) - return false; - - uint32 instancediff = instancebits ^ other.instancebits; - - for (unsigned int i = 0; i < MAX; i++) - { - if (isEnabled(i)) - { - if (instancediff & (1u << i)) - return false; - - if (data[i] != other.data[i]) - return false; - } - } - - return true; - } }; size_t getFormatStride(CommonFormat format);