From 48339aa148200f0f9cdf8ff61b17413ff1dacc87 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 22 Aug 2015 20:23:35 +0200 Subject: simple-mat: can use static_cast here --- opentrack/simple-mat.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'opentrack') diff --git a/opentrack/simple-mat.hpp b/opentrack/simple-mat.hpp index 2b4cb72e..ca60c54d 100644 --- a/opentrack/simple-mat.hpp +++ b/opentrack/simple-mat.hpp @@ -68,12 +68,6 @@ class Mat static_assert(h_ > 0 && w_ > 0, "must have positive mat dimensions"); - struct cast - { - template - static num _(u x) { return static_cast(x); } - }; - Mat(std::initializer_list&& xs) = delete; public: @@ -205,7 +199,7 @@ public: template::value>> Mat(ts const&... xs) { - const std::initializer_list init = { cast::_(xs)... }; + const std::initializer_list init = { static_cast(xs)... }; auto iter = init.begin(); for (int j = 0; j < h_; j++) for (int i = 0; i < w_; i++) -- cgit v1.2.3