diff --git a/Lib/java/std_vector.i b/Lib/java/std_vector.i index 88de46f46..e33270238 100644 --- a/Lib/java/std_vector.i +++ b/Lib/java/std_vector.i @@ -105,14 +105,14 @@ SWIGINTERN jint SWIG_VectorSize(size_t size) { return SWIG_VectorSize(self->size()); } - void doAdd(const value_type& value) { - self->push_back(value); + void doAdd(const value_type& x) { + self->push_back(x); } - void doAdd(jint index, const value_type& value) throw (std::out_of_range) { + void doAdd(jint index, const value_type& x) throw (std::out_of_range) { jint size = static_cast(self->size()); if (0 <= index && index <= size) { - self->insert(self->begin() + index, value); + self->insert(self->begin() + index, x); } else { throw std::out_of_range("vector index out of range"); } @@ -129,7 +129,7 @@ SWIGINTERN jint SWIG_VectorSize(size_t size) { } } - CONST_REFERENCE doGet(jint index) throw (std::out_of_range) { + const_reference doGet(jint index) throw (std::out_of_range) { jint size = static_cast(self->size()); if (index >= 0 && index < size) return (*self)[index]; @@ -137,11 +137,11 @@ SWIGINTERN jint SWIG_VectorSize(size_t size) { throw std::out_of_range("vector index out of range"); } - value_type doSet(jint index, const value_type& value) throw (std::out_of_range) { + value_type doSet(jint index, const value_type& val) throw (std::out_of_range) { jint size = static_cast(self->size()); if (index >= 0 && index < size) { CTYPE const old_value = (*self)[index]; - (*self)[index] = value; + (*self)[index] = val; return old_value; } else @@ -169,7 +169,7 @@ SWIGINTERN jint SWIG_VectorSize(size_t size) { namespace std { template class vector { - SWIG_STD_VECTOR_MINIMUM_INTERNAL(T, const T&) + SWIG_STD_VECTOR_MINIMUM_INTERNAL(T, const value_type&) }; // bool specialization