VolumeFileBlobReader: Define default destructor in source file

Fix an error generated by Clang from the destructor of
`std::unique_ptr<FileInfo> m_file_info` when setting the standard
version to c++23:

`invalid application of 'sizeof' to an incomplete type 'DiscIO::FileInfo'`
This commit is contained in:
Dentomologist
2026-01-04 16:00:19 -08:00
parent fb2a46c4cf
commit b1c9c13ca3
2 changed files with 6 additions and 0 deletions

View File

@@ -33,6 +33,11 @@ VolumeFileBlobReader::VolumeFileBlobReader(const Volume& volume, const Partition
{
}
// This is defined here instead of the header so that the definition of FileInfo is visible when
// m_file_info is destroyed, preventing a compile error caused by calling unique_ptr's destructor
// with an incomplete type.
VolumeFileBlobReader::~VolumeFileBlobReader() = default;
std::unique_ptr<BlobReader> VolumeFileBlobReader::CopyReader() const
{
ASSERT_MSG(DISCIO, false, "Unimplemented");

View File

@@ -20,6 +20,7 @@ class VolumeFileBlobReader final : public BlobReader
public:
static std::unique_ptr<VolumeFileBlobReader>
Create(const Volume& volume, const Partition& partition, std::string_view file_path);
~VolumeFileBlobReader();
BlobType GetBlobType() const override { return BlobType::PLAIN; }
std::unique_ptr<BlobReader> CopyReader() const override;