Better variable naming consistency in STL containers
This commit is contained in:
parent
b51f32a915
commit
fdca8e9829
6 changed files with 15 additions and 15 deletions
|
|
@ -174,7 +174,7 @@
|
|||
bool empty() const;
|
||||
|
||||
%rename(Fill) fill;
|
||||
void fill(const value_type& val);
|
||||
void fill(const value_type& value);
|
||||
|
||||
%rename(Swap) swap;
|
||||
void swap(array& other);
|
||||
|
|
@ -192,9 +192,9 @@
|
|||
else
|
||||
throw std::out_of_range("index");
|
||||
}
|
||||
void setitem(int index, const_reference val) throw (std::out_of_range) {
|
||||
void setitem(int index, const_reference value) throw (std::out_of_range) {
|
||||
if (index>=0 && index<(int)$self->size())
|
||||
(*$self)[index] = val;
|
||||
(*$self)[index] = value;
|
||||
else
|
||||
throw std::out_of_range("index");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,11 +239,11 @@
|
|||
return iter != $self->end();
|
||||
}
|
||||
|
||||
void Add(const key_type& key, const mapped_type& val) throw (std::out_of_range) {
|
||||
void Add(const key_type& key, const mapped_type& value) throw (std::out_of_range) {
|
||||
std::map< K, T, C >::iterator iter = $self->find(key);
|
||||
if (iter != $self->end())
|
||||
throw std::out_of_range("key already exists");
|
||||
$self->insert(std::pair< K, T >(key, val));
|
||||
$self->insert(std::pair< K, T >(key, value));
|
||||
}
|
||||
|
||||
bool Remove(const key_type& key) {
|
||||
|
|
|
|||
|
|
@ -231,9 +231,9 @@
|
|||
else
|
||||
throw std::out_of_range("index");
|
||||
}
|
||||
void setitem(int index, CTYPE const& val) throw (std::out_of_range) {
|
||||
void setitem(int index, CTYPE const& value) throw (std::out_of_range) {
|
||||
if (index>=0 && index<(int)$self->size())
|
||||
(*$self)[index] = val;
|
||||
(*$self)[index] = value;
|
||||
else
|
||||
throw std::out_of_range("index");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue