Be consistent in semantics of %extend on std::list::iterator
This commit is contained in:
parent
00ac1f38e5
commit
5eb46d5f9f
1 changed files with 5 additions and 3 deletions
|
|
@ -72,8 +72,10 @@ namespace std {
|
|||
return **$self;
|
||||
}
|
||||
|
||||
void advance_unchecked(jint index) {
|
||||
std::advance(*$self, index);
|
||||
iterator advance_unchecked(jint index) const {
|
||||
std::list<T>::iterator ret=*$self;
|
||||
std::advance(ret, index);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -156,7 +158,7 @@ namespace std {
|
|||
|
||||
private ListIterator<JAVA_VALUE_TYPE> init(int index) {
|
||||
pos = $javaclassname.this.begin();
|
||||
pos.advance_unchecked(index);
|
||||
pos = pos.advance_unchecked(index);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue