Commit 034537f7 authored by Laurent Belcour's avatar Laurent Belcour

[Clean] Adding coherent assertion when setting an entry in data_io

plugins.
parent 889db8c7
......@@ -151,7 +151,7 @@ public: // methods
}
void set(int i, const vec& x) {
assert(x.size() == parametrization().dimX() + parametrization().dimY());
assert(x.size() == (parametrization().dimX() + parametrization().dimY()));
int iR = i;
int iG = iR + _nSlice;
int iB = iG + _nSlice;
......
......@@ -296,6 +296,7 @@ public:
}
virtual void set(int i, const vec& x) {
assert(x.size() == (parametrization().dimX() + parametrization().dimY()));
const vec& y = x.tail(parametrization().dimY());
for(int isp=0; isp<planes; ++isp) {
Bd[isp*nPerPlane + i] = y[isp];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment