diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-05-25 16:44:39 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-05-25 16:44:57 +0200 |
commit | 4abd3763d8ce650469cee83ce1f413ce4ec43164 (patch) | |
tree | d97cf747ed2311407024cdb227b9f910ae49e973 | |
parent | 4029ee060339551fe885c21a297efad0f8dd864e (diff) |
compat: fix -Wdeprecated-copy
Found with GCC 9.1
-rw-r--r-- | compat/simple-mat.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compat/simple-mat.hpp b/compat/simple-mat.hpp index 01af1c99..e697f76a 100644 --- a/compat/simple-mat.hpp +++ b/compat/simple-mat.hpp @@ -244,6 +244,13 @@ public: data[j][i] = mem[i*H+j]; } + constexpr Mat(const Mat<num, H, W>& x) + { + for (int j = 0; j < H; j++) + for (int i = 0; i < W; i++) + data[j][i] = x(j, i); + } + constexpr operator num*() & { return (num*)data; } constexpr operator const num*() const& { return (const num*)data; } |