mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-03 17:14:46 +00:00
Avoid redundant per-frame calls to getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS")
This commit is contained in:
parent
10e4eb4634
commit
527df2511b
2 changed files with 7 additions and 1 deletions
|
@ -318,7 +318,11 @@ void CCDBSynchronised::writeInitInProgressIntoUIDB()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
if (pIM)
|
if (pIM)
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS")->setValueBool(_InitInProgress);
|
{
|
||||||
|
NLMISC::CCDBNodeLeaf *node = m_CDBInitInProgressDB ? (&*m_CDBInitInProgressDB)
|
||||||
|
: (m_CDBInitInProgressDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:CDB_INIT_IN_PROGRESS"));
|
||||||
|
node->setValueBool(_InitInProgress);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
nlwarning("InterfaceManager not created");
|
nlwarning("InterfaceManager not created");
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,6 +151,8 @@ private:
|
||||||
bool allInitPacketReceived() const { return _InitDeltaReceived == 2; } // Classic database + inventory
|
bool allInitPacketReceived() const { return _InitDeltaReceived == 2; } // Classic database + inventory
|
||||||
|
|
||||||
void writeInitInProgressIntoUIDB();
|
void writeInitInProgressIntoUIDB();
|
||||||
|
|
||||||
|
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> m_CDBInitInProgressDB;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue