| 140 | } |
| 141 | |
| 142 | Object* getAny(const LoadedObjectHandle& handle) |
| 143 | { |
| 144 | auto& ori = getRepositoryItem(handle.type); |
| 145 | if (handle.id >= ori.objects.size()) |
| 146 | { |
| 147 | // We shouldn't get here but sometimes we pass null handles like 0xFF and |
| 148 | // accidentally get here. Ideally the call sites should be fixed so thats |
| 149 | // why we are asserting here. |
| 150 | assert(false); |
| 151 | return nullptr; |
| 152 | } |
| 153 | auto obj = ori.objects[handle.id]; |
| 154 | if (obj == (void*)-1) |
| 155 | { |
| 156 | obj = nullptr; |
| 157 | } |
| 158 | return obj; |
| 159 | } |
| 160 | |
| 161 | /* |
| 162 | static void printHeader(header data) |
no test coverage detected