summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-30 03:55:56 +0100
committerLioncash <mathew1800@gmail.com>2020-10-30 03:57:35 +0100
commit8049b8beb625686a4edd9fd1bdf133496e6f462c (patch)
treecec8eb2a2267f8c9148380c3a931ae5508878a9c /src/common
parentvp9: Be explicit with copy and move operators (diff)
downloadyuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.gz
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.bz2
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.lz
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.xz
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.tar.zst
yuzu-8049b8beb625686a4edd9fd1bdf133496e6f462c.zip
Diffstat (limited to 'src/common')
-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:
explicit Stream();
~Stream();
+ Stream(const Stream&) = delete;
+ Stream& operator=(const Stream&) = delete;
+
+ Stream(Stream&&) = default;
+ Stream& operator=(Stream&&) = default;
+
/// Reposition bitstream "cursor" to the specified offset from origin
void Seek(s32 offset, SeekOrigin origin);
@@ -30,15 +36,15 @@ public:
/// Writes byte at current position
void WriteByte(u8 byte);
- std::size_t GetPosition() const {
+ [[nodiscard]] std::size_t GetPosition() const {
return position;
}
- std::vector<u8>& GetBuffer() {
+ [[nodiscard]] std::vector<u8>& GetBuffer() {
return buffer;
}
- const std::vector<u8>& GetBuffer() const {
+ [[nodiscard]] const std::vector<u8>& GetBuffer() const {
return buffer;
}