[turbine] Make ClipboardObject::typId return a StringView

This commit is contained in:
Gary Talent 2024-05-28 23:39:02 -05:00
parent 5d89370cb0
commit 667dd21a05

View File

@ -17,7 +17,7 @@ class BaseClipboardObject {
virtual ~BaseClipboardObject() noexcept = default; virtual ~BaseClipboardObject() noexcept = default;
[[nodiscard]] [[nodiscard]]
virtual ox::String typeId() const noexcept = 0; virtual ox::StringView typeId() const noexcept = 0;
[[nodiscard]] [[nodiscard]]
constexpr auto typeMatch(ox::StringView typeId) const noexcept { constexpr auto typeMatch(ox::StringView typeId) const noexcept {
@ -28,8 +28,8 @@ class BaseClipboardObject {
template<typename T> template<typename T>
class ClipboardObject: public BaseClipboardObject { class ClipboardObject: public BaseClipboardObject {
[[nodiscard]] [[nodiscard]]
ox::String typeId() const noexcept final { ox::StringView typeId() const noexcept final {
return ox::String(ox::ModelTypeId_v<T>); return ox::ModelTypeId_v<T>;
} }
}; };