sensor.cpp: be less pesky in addChild()

metadata
Wenzel Jakob 2014-06-06 01:01:13 +02:00
parent c391cdf57d
commit 3694c2f034
1 changed files with 0 additions and 2 deletions

View File

@ -145,10 +145,8 @@ Float Sensor::pdfTime(const Ray &ray, EMeasure measure) const {
void Sensor::addChild(const std::string &name, ConfigurableObject *child) { void Sensor::addChild(const std::string &name, ConfigurableObject *child) {
if (child->getClass()->derivesFrom(MTS_CLASS(Sampler))) { if (child->getClass()->derivesFrom(MTS_CLASS(Sampler))) {
Assert(m_sampler == NULL);
m_sampler = static_cast<Sampler *>(child); m_sampler = static_cast<Sampler *>(child);
} else if (child->getClass()->derivesFrom(MTS_CLASS(Film))) { } else if (child->getClass()->derivesFrom(MTS_CLASS(Film))) {
Assert(m_film == NULL);
m_film = static_cast<Film *>(child); m_film = static_cast<Film *>(child);
} else { } else {
AbstractEmitter::addChild(name, child); AbstractEmitter::addChild(name, child);