From 997e03433fd41ad2ba1dc4242ff5a90f55ce694d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 19 Mar 2023 23:30:02 +0000 Subject: Make Vertex aggregrate constructor conditional on requirement --- gfx/models/vertex.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gfx/models/vertex.hpp') diff --git a/gfx/models/vertex.hpp b/gfx/models/vertex.hpp index 325aab1..28dc8f3 100644 --- a/gfx/models/vertex.hpp +++ b/gfx/models/vertex.hpp @@ -4,10 +4,12 @@ class Vertex { public: +#ifndef __cpp_aggregate_paren_init constexpr Vertex(glm::vec3 pos, glm::vec2 texCoord, glm::vec3 normal, glm::vec4 colour = {}) : pos {std::move(pos)}, texCoord {std::move(texCoord)}, normal {std::move(normal)}, colour {std::move(colour)} { } +#endif glm::vec3 pos; glm::vec2 texCoord; -- cgit v1.2.3 From c3617a13b6e4d9fb50d32478c68fae94be1b2cba Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 19 Mar 2023 23:31:17 +0000 Subject: Add defaulted Vertex equality operator --- gfx/models/vertex.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gfx/models/vertex.hpp') diff --git a/gfx/models/vertex.hpp b/gfx/models/vertex.hpp index 28dc8f3..64ec3d0 100644 --- a/gfx/models/vertex.hpp +++ b/gfx/models/vertex.hpp @@ -11,6 +11,8 @@ public: } #endif + bool operator==(const Vertex &) const = default; + glm::vec3 pos; glm::vec2 texCoord; glm::vec3 normal; -- cgit v1.2.3