From 64c11bdcb098c967cd58d63b84752af7003163d2 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 13 Jan 2015 18:39:27 +1100 Subject: [PATCH] point/vector: use coord constructors --- point.cpp | 6 ------ point.hpp | 5 +---- vector.cpp | 6 ------ vector.hpp | 5 +---- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/point.cpp b/point.cpp index 40f15c8c..2fa9baac 100644 --- a/point.cpp +++ b/point.cpp @@ -31,12 +31,6 @@ using namespace std; #pragma GCC optimize("-O3") #endif -//----------------------------------------------------------------------------- -template -util::point::point () -{ ; } - - //----------------------------------------------------------------------------- template util::point& diff --git a/point.hpp b/point.hpp index 952623c9..500b9e5a 100644 --- a/point.hpp +++ b/point.hpp @@ -34,10 +34,7 @@ namespace util { struct point : public detail::coord { static_assert (S > 0, "point dimensions must be strictly positive."); - point (); - - template - point (U ...u): detail::coord {std::forward (u)...} { ; } + using detail::coord::coord; // point operators template typename std::common_type::type distance (const point &) const; diff --git a/vector.cpp b/vector.cpp index 63201679..f7e47263 100644 --- a/vector.cpp +++ b/vector.cpp @@ -38,12 +38,6 @@ using std::begin; using std::end; -//----------------------------------------------------------------------------- -template -util::vector::vector () -{ ; } - - //----------------------------------------------------------------------------- template util::vector diff --git a/vector.hpp b/vector.hpp index 9532fd34..d5c2ca34 100644 --- a/vector.hpp +++ b/vector.hpp @@ -32,10 +32,7 @@ namespace util { struct vector : public detail::coord { static_assert (S > 0, "vector dimensions must be strictly positive"); - vector (); - - template - vector (U ...u): detail::coord {std::forward (u)...} { ; } + using detail::coord::coord; // arithmetic operators vector operator* (T) const;