forked from organicmaps/organicmaps
Minor fixes
This commit is contained in:
parent
3fe528014b
commit
6a395b0aba
3 changed files with 8 additions and 12 deletions
|
@ -385,13 +385,7 @@ namespace graphics
|
|||
|
||||
void Overlay::deleteNotProcessed()
|
||||
{
|
||||
for (set<OverlayElement *>::const_iterator it = m_notProcessedElements.begin();
|
||||
it != m_notProcessedElements.end();
|
||||
++it)
|
||||
{
|
||||
delete *it;
|
||||
}
|
||||
|
||||
for_each(m_notProcessedElements.begin(), m_notProcessedElements.end(), DeleteFunctor());
|
||||
m_notProcessedElements.clear();
|
||||
}
|
||||
|
||||
|
@ -399,11 +393,13 @@ namespace graphics
|
|||
void Overlay::validateNotProcessed()
|
||||
{
|
||||
vector<OverlayElement *> v;
|
||||
|
||||
m_tree.ForEach(MakeBackInsertFunctor(v));
|
||||
|
||||
for (size_t i = 0; i < v.size(); ++i)
|
||||
{
|
||||
ASSERT(m_notProcessedElements.find(v[i]) == m_notProcessedElements.end(),
|
||||
("Object marked to deletion in tree!!!"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace graphics
|
|||
|
||||
struct Deleter
|
||||
{
|
||||
void operator()(Overlay * overlay)
|
||||
void operator()(Overlay * overlay) const
|
||||
{
|
||||
DeleteOverlay(overlay);
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ namespace graphics
|
|||
m_threadID = id;
|
||||
}
|
||||
|
||||
bool validateTread(threads::ThreadID id)
|
||||
bool validateThread(threads::ThreadID id)
|
||||
{
|
||||
return m_threadID == id;
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ void CoverageGenerator::CoverScreen(core::CommandsQueue::Environment const & env
|
|||
m_workCoverage->SetSequenceID(sequenceID);
|
||||
m_workCoverage->SetScreen(screen);
|
||||
#ifdef DEBUG
|
||||
m_overlay.validateTread(threads::GetCurrentThreadID());
|
||||
m_overlay.validateThread(threads::GetCurrentThreadID());
|
||||
#endif
|
||||
m_workCoverage->MergeOverlay(&m_overlay);
|
||||
|
||||
|
@ -272,7 +272,7 @@ void CoverageGenerator::MergeTile(core::CommandsQueue::Environment const & env,
|
|||
m_currentCoverage->CopyInto(*m_workCoverage);
|
||||
m_workCoverage->SetSequenceID(sequenceID);
|
||||
#ifdef DEBUG
|
||||
m_overlay.validateTread(threads::GetCurrentThreadID());
|
||||
m_overlay.validateThread(threads::GetCurrentThreadID());
|
||||
#endif
|
||||
m_workCoverage->Merge(rectInfo, &m_overlay);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue