regular constructor
| 766 | |
| 767 | // regular constructor |
| 768 | DirectoryNode(IndexedIO::EntryID name, std::optional<uint32_t> numChildren = std::optional<uint32_t>()) : NodeBase( NodeBase::Directory, name ), |
| 769 | m_subindex( NoSubIndex ), |
| 770 | m_sortedChildren( false ), |
| 771 | m_subindexChildren( false ), |
| 772 | m_offset( 0 ), |
| 773 | m_parent( nullptr ) |
| 774 | { |
| 775 | if ( numChildren ) |
| 776 | { |
| 777 | m_children.reserve( *numChildren ); |
| 778 | } |
| 779 | |
| 780 | } |
| 781 | |
| 782 | // constructor used when building a directory based on an existing SubIndexNode (because we want to load the contents soon). |
| 783 | DirectoryNode( SubIndexNode *subindex, DirectoryNode *parent ) : NodeBase(NodeBase::Directory, subindex->name()), m_subindex(SavedSubIndex), m_sortedChildren(false), m_subindexChildren(false), m_offset(subindex->offset()), m_parent(parent) {} |