additional check

This commit is contained in:
Roman Sorokin 2014-08-11 16:23:06 +03:00 committed by Alex Zolotarev
parent 2f4f4929ed
commit 8f9833a411
2 changed files with 13 additions and 18 deletions

View file

@ -4,37 +4,37 @@
namespace df
{
ReadMWMTask::ReadMWMTask(weak_ptr<TileInfo> const & tileInfo,
MemoryFeatureIndex & memIndex,
model::FeaturesFetcher & model,
EngineContext & context)
: m_tileInfo(tileInfo)
, m_memIndex(memIndex)
, m_model(model)
, m_context(context)
{
}
ReadMWMTask::ReadMWMTask(MemoryFeatureIndex & memIndex, model::FeaturesFetcher & model,
EngineContext & context)
: m_memIndex(memIndex)
, m_model(model)
, m_context(context)
{
#ifdef DEBUG
m_checker = false;
#endif
}
void ReadMWMTask::init(weak_ptr<TileInfo> const & tileInfo)
void ReadMWMTask::Init(weak_ptr<TileInfo> const & tileInfo)
{
m_tileInfo = tileInfo;
#ifdef DEBUG
m_checker = true;
#endif
}
void ReadMWMTask::Reset()
{
#ifdef DEBUG
m_checker = false;
#endif
}
void ReadMWMTask::Do()
{
#ifdef DEBUG
ASSERT(m_checker, ());
#endif
shared_ptr<TileInfo> tileInfo = m_tileInfo.lock();
if (tileInfo == NULL)
return;

View file

@ -18,11 +18,6 @@ class EngineContext;
class ReadMWMTask : public threads::IRoutine
{
public:
ReadMWMTask(weak_ptr<TileInfo> const & tileInfo,
MemoryFeatureIndex & memIndex,
model::FeaturesFetcher & model,
EngineContext & context);
ReadMWMTask(MemoryFeatureIndex & memIndex,
model::FeaturesFetcher & model,
EngineContext & context);