| 403 | } |
| 404 | |
| 405 | void virtual_identity::adjust_vtable(virtual_ptr obj, const virtual_identity *main) const |
| 406 | { |
| 407 | auto vp = vtable_ptr(); |
| 408 | if (vp) { |
| 409 | *(void**)obj = vp; |
| 410 | return; |
| 411 | } |
| 412 | |
| 413 | if (main && main != this && is_subclass(main)) |
| 414 | return; |
| 415 | |
| 416 | std::cerr << "Attempt to create class '" << getName() << "' without known vtable." << std::endl; |
| 417 | throw DFHack::Error::VTableMissing(getName()); |
| 418 | } |
| 419 | |
| 420 | virtual_ptr virtual_identity::clone(virtual_ptr obj) |
| 421 | { |
nothing calls this directly
no test coverage detected