#ifndef OPENMW_COMPONENTS_FILES_STREAMWITHBUFFER_H #define OPENMW_COMPONENTS_FILES_STREAMWITHBUFFER_H #include #include namespace Files { template class StreamWithBuffer final : public std::istream { public: explicit StreamWithBuffer(std::unique_ptr&& buffer) : std::istream(buffer.get()) , mBuffer(std::move(buffer)) { } private: std::unique_ptr mBuffer; }; } #endif