Something went wrong. Try again.
OpenMW is an open implementation of the Morrowind engine
Something went wrong. Try again.
502 B · 24 lines
C++
12345678910111213141516171819202122232425#ifndef OPENMW_COMPONENTS_FILES_STREAMWITHBUFFER_H#define OPENMW_COMPONENTS_FILES_STREAMWITHBUFFER_H
#include <istream>#include <memory>
namespace Files{ template <class Buffer> class StreamWithBuffer final : public std::istream { public: explicit StreamWithBuffer(std::unique_ptr<Buffer>&& buffer) : std::istream(buffer.get()) , mBuffer(std::move(buffer)) { }
private: std::unique_ptr<Buffer> mBuffer; };}
#endif