| 68 | } |
| 69 | |
| 70 | const LightSource *LightSourceDefinitions::GetLightSource(const string &name) const { |
| 71 | // Check if the LightSource has been already defined |
| 72 | boost::unordered_map<std::string, LightSource *>::const_iterator it = lightsByName.find(name); |
| 73 | |
| 74 | if (it == lightsByName.end()) |
| 75 | throw runtime_error("Reference to an undefined LightSource in LightSourceDefinitions::GetLightSource(): " + name); |
| 76 | else |
| 77 | return it->second; |
| 78 | } |
| 79 | |
| 80 | LightSource *LightSourceDefinitions::GetLightSource(const string &name) { |
| 81 | // Check if the LightSource has been already defined |
no test coverage detected