aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_classes/codecs/codec.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-30 16:13:29 -0400
committerLioncash <mathew1800@gmail.com>2020-11-02 02:45:15 -0500
commit2ee59021c29bf6f3fb3b665923bb2b0589ceacf8 (patch)
treee35c6800340cec5f104e094a377c69ccc3dd101f /src/video_core/command_classes/codecs/codec.h
parentb712b3684a1571508cf480e1b38b0e8ab867643d (diff)
nvdec: Make use of [[nodiscard]] where applicable
Prevents bugs from occurring where the results of a function are accidentally discarded
Diffstat (limited to 'src/video_core/command_classes/codecs/codec.h')
-rw-r--r--src/video_core/command_classes/codecs/codec.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/command_classes/codecs/codec.h b/src/video_core/command_classes/codecs/codec.h
index cb67094f68..5bbe6a332f 100644
--- a/src/video_core/command_classes/codecs/codec.h
+++ b/src/video_core/command_classes/codecs/codec.h
@@ -42,11 +42,11 @@ public:
void Decode();
/// Returns most recently decoded frame
- AVFrame* GetCurrentFrame();
- const AVFrame* GetCurrentFrame() const;
+ [[nodiscard]] AVFrame* GetCurrentFrame();
+ [[nodiscard]] const AVFrame* GetCurrentFrame() const;
/// Returns the value of current_codec
- NvdecCommon::VideoCodec GetCurrentCodec() const;
+ [[nodiscard]] NvdecCommon::VideoCodec GetCurrentCodec() const;
private:
bool initialized{};