Improve backwards compatibility in C#/Java std::array wrappers

For users who have typemaps for the parameters in the setitem or set methods.
This commit is contained in:
William S Fulton 2019-04-19 11:06:24 +01:00
commit f87182ad98
2 changed files with 4 additions and 4 deletions

View file

@ -192,9 +192,9 @@
else
throw std::out_of_range("index");
}
void setitem(int index, const_reference value) throw (std::out_of_range) {
void setitem(int index, const_reference val) throw (std::out_of_range) {
if (index>=0 && index<(int)$self->size())
(*$self)[index] = value;
(*$self)[index] = val;
else
throw std::out_of_range("index");
}