a bit of refactor in mapbox::util::nth

Mon, 20 Jun 2022 22:41:34 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Mon, 20 Jun 2022 22:41:34 +0300
changeset 244
065db0753f05
parent 243
959469a7e149
child 245
a41ccc6924e3

a bit of refactor in mapbox::util::nth

src/document.cpp file | annotate | diff | comparison | revisions
--- a/src/document.cpp	Mon Jun 20 22:40:31 2022 +0300
+++ b/src/document.cpp	Mon Jun 20 22:41:34 2022 +0300
@@ -26,18 +26,15 @@
 #include "circularprimitive.h"
 
 // Make mapbox::earcut work with glm::vec3
-namespace mapbox {
-namespace util {
-template<> struct nth<0, glm::vec3>
+template<> struct mapbox::util::nth<0, glm::vec3>
 {
 	static constexpr float get(const glm::vec3& t) { return t.x; };
 };
-template<> struct nth<1, glm::vec3>
+
+template<> struct mapbox::util::nth<1, glm::vec3>
 {
 	static constexpr float get(const glm::vec3& t) { return t.y; };
 };
-}
-}
 
 EditTools::EditTools(QObject* parent) :
 	QObject{parent},

mercurial