| 139 | } |
| 140 | |
| 141 | std::unique_ptr<void, void (*)(void*)> |
| 142 | BundleResourceContainer::GetData(int index) |
| 143 | { |
| 144 | OpenAndInitializeContainer(); |
| 145 | std::unique_lock<std::mutex> l(m_ZipFileStreamMutex); |
| 146 | void* data = mz_zip_reader_extract_to_heap(const_cast<mz_zip_archive*>(&m_ZipArchive), index, nullptr, 0); |
| 147 | return { data, ::free }; |
| 148 | } |
| 149 | |
| 150 | void |
| 151 | BundleResourceContainer::GetChildren(std::string const& resourcePath, |