From 4f0f481f63d0d5587a6d6d319f9815de87ed79ec Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 30 Oct 2020 16:13:29 -0400 Subject: nvdec: Make use of [[nodiscard]] where applicable Prevents bugs from occurring where the results of a function are accidentally discarded --- src/video_core/command_classes/codecs/vp9_types.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/video_core/command_classes/codecs/vp9_types.h') diff --git a/src/video_core/command_classes/codecs/vp9_types.h b/src/video_core/command_classes/codecs/vp9_types.h index a50acf6e8..4f0b05d22 100644 --- a/src/video_core/command_classes/codecs/vp9_types.h +++ b/src/video_core/command_classes/codecs/vp9_types.h @@ -231,9 +231,8 @@ struct PictureInfo { u32 surface_params{}; INSERT_PADDING_WORDS(3); - Vp9PictureInfo Convert() const { - - return Vp9PictureInfo{ + [[nodiscard]] Vp9PictureInfo Convert() const { + return { .is_key_frame = (vp9_flags & FrameFlags::IsKeyFrame) != 0, .intra_only = (vp9_flags & FrameFlags::IntraOnly) != 0, .last_frame_was_key = (vp9_flags & FrameFlags::LastFrameIsKeyFrame) != 0, -- cgit v1.2.3