summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/simple-mat.hpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/compat/simple-mat.hpp b/compat/simple-mat.hpp
index fbd0a75e..a119044c 100644
--- a/compat/simple-mat.hpp
+++ b/compat/simple-mat.hpp
@@ -193,13 +193,9 @@ public:
template<typename... ts, int h__ = h_, int w__ = w_,
typename = typename std::enable_if<is_arglist_correct<num, h__, w__, ts...>::value>::type>
- Mat(const ts... xs)
+ Mat(const ts... xs) : data{static_cast<num>(xs)...}
{
static_assert(h__ == h_ && w__ == w_, "");
-
- std::initializer_list<num> init = { static_cast<num>(xs)... };
-
- *this = Mat(std::move(init));
}
Mat()
@@ -216,14 +212,6 @@ public:
data[j][i] = mem[i*h_+j];
}
- Mat(std::initializer_list<num>&& init)
- {
- auto iter = init.begin();
- for (int j = 0; j < h_; j++)
- for (int i = 0; i < w_; i++)
- data[j][i] = *iter++;
- }
-
operator num*() { return reinterpret_cast<num*>(data); }
operator const num*() const { return reinterpret_cast<const num*>(data); }