From e822bf2ccb0d676d7e222e2a90c300ed55097d98 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 3 Aug 2022 00:39:40 -0500 Subject: [PATCH] [nostalgia/core] Add missing nodiscards to clipboard types --- src/nostalgia/core/context.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nostalgia/core/context.hpp b/src/nostalgia/core/context.hpp index 550fb5db..e240930a 100644 --- a/src/nostalgia/core/context.hpp +++ b/src/nostalgia/core/context.hpp @@ -21,8 +21,10 @@ class BaseClipboardObject { public: virtual ~BaseClipboardObject() = default; + [[nodiscard]] virtual ox::String typeId() const noexcept = 0; + [[nodiscard]] constexpr auto typeMatch(auto name, auto version) const noexcept { auto inId = ox::sfmt("{};{}", name, version); return typeId() == inId; @@ -31,6 +33,7 @@ class BaseClipboardObject { template class ClipboardObject: public BaseClipboardObject { + [[nodiscard]] ox::String typeId() const noexcept final { return ox::sfmt("{};{}", T::TypeName, T::TypeVersion); }