OXYGENHUB
◆ main openmsx / src / EmptyPatch.hh
596 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef EMPTYPATCH_HH
2
#define EMPTYPATCH_HH
3
4
#include "PatchInterface.hh"
5
6
namespace openmsx {
7
8
class EmptyPatch final : public PatchInterface
9
{
10
public:
11
	explicit EmptyPatch(std::span<const uint8_t> block_)
12
		: block(block_) {}
13
14
	void copyBlock(size_t src, std::span<uint8_t> dst) const override;
15
	[[nodiscard]] size_t getSize() const override { return block.size(); }
16
	[[nodiscard]] std::vector<Filename> getFilenames() const override { return {}; }
17
	[[nodiscard]] bool isEmptyPatch() const override { return true; }
18
19
private:
20
	std::span<const uint8_t> block;
21
};
22
23
} // namespace openmsx
24
25
#endif