| 653 | } |
| 654 | |
| 655 | static bool partialLoad(const ObjectHeader& header, std::span<std::byte> objectData) |
| 656 | { |
| 657 | auto type = header.getType(); |
| 658 | size_t index = 0; |
| 659 | for (; index < getMaxObjects(type); ++index) |
| 660 | { |
| 661 | if (getRepositoryItem(type).objects[index] == reinterpret_cast<Object*>(-1)) |
| 662 | { |
| 663 | break; |
| 664 | } |
| 665 | } |
| 666 | // No slot found. Not possible except if unload all had not been called |
| 667 | if (index >= getMaxObjects(type)) |
| 668 | { |
| 669 | return false; |
| 670 | } |
| 671 | |
| 672 | auto* obj = reinterpret_cast<Object*>(objectData.data()); |
| 673 | getRepositoryItem(type).objects[index] = obj; |
| 674 | getRepositoryItem(type).objectEntryExtendeds[index] = ObjectEntry2(header, static_cast<uint32_t>(objectData.size())); |
| 675 | return true; |
| 676 | } |
| 677 | |
| 678 | static void permutateObjectFilename(std::string& filename) |
| 679 | { |
no test coverage detected