mirror of https://github.com/qt/qtgraphs.git
Get rid of some clazy warnings in graphs2d/piechart folder
Fix "c++11 range-loop might detach Qt container" warnings.
Pick-to: 6.9
Change-Id: I3a61992a654fb09838ae005a67c0085eb8c1421c
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
(cherry picked from commit 59d8120076)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6b879d4250
commit
bde33c5619
|
|
@ -555,7 +555,8 @@ QPieSlice *QPieSeries::at(qsizetype index)
|
||||||
*/
|
*/
|
||||||
QPieSlice *QPieSeries::find(const QString &label)
|
QPieSlice *QPieSeries::find(const QString &label)
|
||||||
{
|
{
|
||||||
for (QPieSlice *slice : slices()) {
|
auto slicelist = slices();
|
||||||
|
for (QPieSlice *slice : std::as_const(slicelist)) {
|
||||||
if (slice->label() == label)
|
if (slice->label() == label)
|
||||||
return slice;
|
return slice;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue