summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2020-10-29 22:55:56 -0400
committerGravatar Lioncash2020-10-29 22:57:35 -0400
commit8049b8beb625686a4edd9fd1bdf133496e6f462c (patch)
treecec8eb2a2267f8c9148380c3a931ae5508878a9c
parentvp9: Be explicit with copy and move operators (diff)
downloadyuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.gz
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.xz
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.zip
common/stream: Be explicit with copy and move operators
-rw-r--r--src/common/stream.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/stream.h b/src/common/stream.h
index 2585c16af..0e40692de 100644
--- a/src/common/stream.h
+++ b/src/common/stream.h
@@ -21,6 +21,12 @@ public:
21 explicit Stream(); 21 explicit Stream();
22 ~Stream(); 22 ~Stream();
23 23
24 Stream(const Stream&) = delete;
25 Stream& operator=(const Stream&) = delete;
26
27 Stream(Stream&&) = default;
28 Stream& operator=(Stream&&) = default;
29
24 /// Reposition bitstream "cursor" to the specified offset from origin 30 /// Reposition bitstream "cursor" to the specified offset from origin
25 void Seek(s32 offset, SeekOrigin origin); 31 void Seek(s32 offset, SeekOrigin origin);
26 32
@@ -30,15 +36,15 @@ public:
30 /// Writes byte at current position 36 /// Writes byte at current position
31 void WriteByte(u8 byte); 37 void WriteByte(u8 byte);
32 38
33 std::size_t GetPosition() const { 39 [[nodiscard]] std::size_t GetPosition() const {
34 return position; 40 return position;
35 } 41 }
36 42
37 std::vector<u8>& GetBuffer() { 43 [[nodiscard]] std::vector<u8>& GetBuffer() {
38 return buffer; 44 return buffer;
39 } 45 }
40 46
41 const std::vector<u8>& GetBuffer() const { 47 [[nodiscard]] const std::vector<u8>& GetBuffer() const {
42 return buffer; 48 return buffer;
43 } 49 }
44 50