mirror of https://github.com/KLayout/klayout.git
post-increment operators must not use the int argument (it is zero)
This commit is contained in:
parent
1868dcc104
commit
7e8ce51da2
|
|
@ -116,12 +116,10 @@ public:
|
|||
/**
|
||||
* @brief Post-decrement
|
||||
*/
|
||||
weak_or_shared_collection_iterator<T, Holder, Shared> operator-- (int n)
|
||||
weak_or_shared_collection_iterator<T, Holder, Shared> operator-- (int)
|
||||
{
|
||||
weak_or_shared_collection_iterator<T, Holder, Shared> ret = *this;
|
||||
while (n-- > 0) {
|
||||
operator-- ();
|
||||
}
|
||||
operator-- ();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -138,12 +136,10 @@ public:
|
|||
/**
|
||||
* @brief Post-increment
|
||||
*/
|
||||
weak_or_shared_collection_iterator<T, Holder, Shared> operator++ (int n)
|
||||
weak_or_shared_collection_iterator<T, Holder, Shared> operator++ (int)
|
||||
{
|
||||
weak_or_shared_collection_iterator<T, Holder, Shared> ret = *this;
|
||||
while (n-- > 0) {
|
||||
operator++ ();
|
||||
}
|
||||
operator++ ();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue