Q*Iterable::const_iterator: pass by const reference

The iterators are quite heavy objects (>100bytes), don't pass them
by value.

Change-Id: I4c9d1f64d14419a35bd067884d7e8bca2589f9b9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2020-06-29 14:29:51 +02:00
parent 26fbf8082c
commit bb02b9696e

View File

@ -626,7 +626,7 @@ public:
const_iterator &operator-=(int j);
const_iterator operator+(int j) const;
const_iterator operator-(int j) const;
friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
friend inline const_iterator operator+(int j, const const_iterator &k) { return k + j; }
};
friend struct const_iterator;
@ -680,7 +680,7 @@ public:
const_iterator &operator-=(int j);
const_iterator operator+(int j) const;
const_iterator operator-(int j) const;
friend inline const_iterator operator+(int j, const_iterator k) { return k + j; }
friend inline const_iterator operator+(int j, const const_iterator &k) { return k + j; }
};
friend struct const_iterator;