From dd2bb6cc86d59f7b6600a2e75142470539dc8a71 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 17 Jun 2016 15:02:06 +0200 Subject: api/simple-mat: allow for casts to num* and const Due to memory layout we don't need enable_if for vector. --- opentrack/simple-mat.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'opentrack') diff --git a/opentrack/simple-mat.hpp b/opentrack/simple-mat.hpp index ce2bccc5..f5680ec4 100644 --- a/opentrack/simple-mat.hpp +++ b/opentrack/simple-mat.hpp @@ -206,13 +206,8 @@ public: Mat(num* mem) : Mat(const_cast(mem)) {} - template::type> - operator const double*() const - { - return reinterpret_cast(data); - } + operator num*() { return reinterpret_cast(data); } + operator const num*() const { return reinterpret_cast(data); } // XXX add more operators as needed, third-party dependencies mostly // not needed merely for matrix algebra -sh 20141030 -- cgit v1.2.3