Skip to content

Commit 4bc1a18

Browse files
2 parents 80eb628 + 0225563 commit 4bc1a18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DockContainerWidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,9 +1319,9 @@ void CDockContainerWidget::removeDockArea(CDockAreaWidget* area)
13191319
internal::hideEmptyParentSplitters(Splitter);
13201320

13211321
// Remove this area from cached areas
1322-
const auto& cache = d->LastAddedAreaCache;
1323-
if (auto p = std::find(cache, cache+sizeof(cache)/sizeof(cache[0]), area)) {
1324-
d->LastAddedAreaCache[std::distance(cache, p)] = nullptr;
1322+
auto p = std::find(std::begin(d->LastAddedAreaCache), std::end(d->LastAddedAreaCache), area);
1323+
if (p != std::end(d->LastAddedAreaCache)) {
1324+
*p = nullptr;
13251325
}
13261326

13271327
// If splitter has more than 1 widgets, we are finished and can leave

0 commit comments

Comments
 (0)