[turbine] Remove ClipboardObject::typeMatches
This commit is contained in:
parent
667dd21a05
commit
a8bb99b620
@ -18,11 +18,6 @@ class BaseClipboardObject {
|
|||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
virtual ox::StringView typeId() const noexcept = 0;
|
virtual ox::StringView typeId() const noexcept = 0;
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
constexpr auto typeMatch(ox::StringView typeId) const noexcept {
|
|
||||||
return this->typeId() == typeId;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -27,7 +27,7 @@ void setClipboardObject(Context &ctx, ox::UPtr<BaseClipboardObject> &&obj) noexc
|
|||||||
}
|
}
|
||||||
|
|
||||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringView typeId) noexcept {
|
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringView typeId) noexcept {
|
||||||
if (ctx.clipboard && ctx.clipboard->typeMatch(typeId)) {
|
if (ctx.clipboard && ctx.clipboard->typeId() == typeId) {
|
||||||
return ctx.clipboard.get();
|
return ctx.clipboard.get();
|
||||||
}
|
}
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user