Skip to content
Snippets Groups Projects
Commit 12eeffcb authored by Lioncash's avatar Lioncash
Browse files

vp9: Be explicit with copy and move operators

It's deprecated in the language to autogenerate these if the destructor
for a type is specified, so we can explicitly specify how we want these
to be generated.
parent 0d713cf8
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,12 @@ public: ...@@ -25,6 +25,12 @@ public:
VpxRangeEncoder(); VpxRangeEncoder();
~VpxRangeEncoder(); ~VpxRangeEncoder();
VpxRangeEncoder(const VpxRangeEncoder&) = delete;
VpxRangeEncoder& operator=(const VpxRangeEncoder&) = delete;
VpxRangeEncoder(VpxRangeEncoder&&) = default;
VpxRangeEncoder& operator=(VpxRangeEncoder&&) = default;
/// Writes the rightmost value_size bits from value into the stream /// Writes the rightmost value_size bits from value into the stream
void Write(s32 value, s32 value_size); void Write(s32 value, s32 value_size);
...@@ -59,6 +65,12 @@ public: ...@@ -59,6 +65,12 @@ public:
VpxBitStreamWriter(); VpxBitStreamWriter();
~VpxBitStreamWriter(); ~VpxBitStreamWriter();
VpxBitStreamWriter(const VpxBitStreamWriter&) = delete;
VpxBitStreamWriter& operator=(const VpxBitStreamWriter&) = delete;
VpxBitStreamWriter(VpxBitStreamWriter&&) = default;
VpxBitStreamWriter& operator=(VpxBitStreamWriter&&) = default;
/// Write an unsigned integer value /// Write an unsigned integer value
void WriteU(u32 value, u32 value_size); void WriteU(u32 value, u32 value_size);
...@@ -99,6 +111,12 @@ public: ...@@ -99,6 +111,12 @@ public:
explicit VP9(GPU& gpu); explicit VP9(GPU& gpu);
~VP9(); ~VP9();
VP9(const VP9&) = delete;
VP9& operator=(const VP9&) = delete;
VP9(VP9&&) = default;
VP9& operator=(VP9&&) = delete;
/// Composes the VP9 frame from the GPU state information. Based on the official VP9 spec /// Composes the VP9 frame from the GPU state information. Based on the official VP9 spec
/// documentation /// documentation
std::vector<u8>& ComposeFrameHeader(NvdecCommon::NvdecRegisters& state); std::vector<u8>& ComposeFrameHeader(NvdecCommon::NvdecRegisters& state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment