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:
parent
592b97a8cd
commit
f87182ad98
2 changed files with 4 additions and 4 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue