| 88 | } |
| 89 | |
| 90 | memory::RefCount *ObjectHandle::lookup() const |
| 91 | { |
| 92 | if (i64 == 0) |
| 93 | return nullptr; |
| 94 | |
| 95 | auto it = objectByHandle.find(i64); |
| 96 | if (it == objectByHandle.end()) { |
| 97 | #ifndef NDEBUG |
| 98 | // iw - made this into a warning only; the original code had |
| 99 | // this throw an actual exceptoin, but that may be overkill |
| 100 | std::cout << "#osp: WARNING: ospray is trying to look up object handle " |
| 101 | + std::to_string(i64) + " that isn't defined!" |
| 102 | << std::endl; |
| 103 | #endif |
| 104 | return nullptr; |
| 105 | } |
| 106 | |
| 107 | return it->second; |
| 108 | } |
| 109 | |
| 110 | ObjectHandle ObjectHandle::lookup(memory::RefCount *object) |
| 111 | { |
no test coverage detected