mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T184 Optimization: getSelectedDockInfoArea iterates over all info areas in linear O(n) time.
There is no need to do this in isSelectedDockWidgetInfoArea, as it can be checked in constant O(1) time. This method was occupying a significant proportion of the CPU time of swift.
This commit is contained in:
@@ -169,7 +169,9 @@ namespace BlackGui
|
||||
{
|
||||
if (!infoArea) { return false; }
|
||||
if (infoArea->isFloating()) { return false; }
|
||||
return infoArea == this->getSelectedDockInfoArea();
|
||||
if (!infoArea->isWidgetVisible()) { return false; }
|
||||
if (!m_tabBar || m_tabBar->count() < 1) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
const CDockWidgetInfoArea *CInfoArea::getSelectedDockInfoArea() const
|
||||
|
||||
Reference in New Issue
Block a user