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

@ -31,10 +31,10 @@ namespace std {
else
throw std::out_of_range("array index out of range");
}
void set(int i, const value_type& value) throw (std::out_of_range) {
void set(int i, const value_type& val) throw (std::out_of_range) {
int size = int(self->size());
if (i>=0 && i<size)
(*self)[i] = value;
(*self)[i] = val;
else
throw std::out_of_range("array index out of range");
}