[nostalgia/core] Add missing nodiscards to clipboard types

This commit is contained in:
Gary Talent 2022-08-03 00:39:40 -05:00
parent d9f0415074
commit e822bf2ccb

View File

@ -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<typename T>
class ClipboardObject: public BaseClipboardObject {
[[nodiscard]]
ox::String typeId() const noexcept final {
return ox::sfmt("{};{}", T::TypeName, T::TypeVersion);
}