QByteArray: bring end() into idiomatic form
For contiguous containers, end() is always begin() + size(), so use that instead of data() + size(). Centralizes what it means to be an iterator in just begin() now, which will simplify a follow-up commit of Thiago's. Pick-to: 6.5 Change-Id: I53ca1a335910bdea3d46b9496ba39bc1a2d3fd93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9dd19532187bd6a5465e6c98a554d24dad1d06d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
66cd58b2a5
commit
4cccd3d3dd
@ -429,8 +429,8 @@ public:
|
||||
const_iterator begin() const noexcept { return data(); }
|
||||
const_iterator cbegin() const noexcept { return begin(); }
|
||||
const_iterator constBegin() const noexcept { return begin(); }
|
||||
iterator end() { return data() + size(); }
|
||||
const_iterator end() const noexcept { return data() + size(); }
|
||||
iterator end() { return begin() + size(); }
|
||||
const_iterator end() const noexcept { return begin() + size(); }
|
||||
const_iterator cend() const noexcept { return end(); }
|
||||
const_iterator constEnd() const noexcept { return end(); }
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user