diff --git a/src/olympic/turbine/include/turbine/clipboard.hpp b/src/olympic/turbine/include/turbine/clipboard.hpp index 097c9952..2c4a214f 100644 --- a/src/olympic/turbine/include/turbine/clipboard.hpp +++ b/src/olympic/turbine/include/turbine/clipboard.hpp @@ -20,8 +20,8 @@ class BaseClipboardObject { virtual ox::String typeId() const noexcept = 0; [[nodiscard]] - constexpr auto typeMatch(ox::StringView name, int version) const noexcept { - return typeId() == ox::buildTypeId(name, version); + constexpr auto typeMatch(ox::StringView typeId) const noexcept { + return this->typeId() == typeId; } }; @@ -39,11 +39,11 @@ void setClipboardText(Context &ctx, ox::CRStringView text) noexcept; void setClipboardObject(Context &ctx, ox::UPtr &&obj) noexcept; -ox::Result getClipboardData(Context &ctx, ox::StringView typeName, int typeVersion) noexcept; +ox::Result getClipboardData(Context &ctx, ox::StringView typeId) noexcept; template ox::Result getClipboardObject(Context &ctx) noexcept { - oxRequire(p, getClipboardData(ctx, T::TypeName, T::TypeVersion)); + oxRequire(p, getClipboardData(ctx, ox::ModelTypeId_v)); return dynamic_cast(p); } diff --git a/src/olympic/turbine/src/glfw/clipboard.cpp b/src/olympic/turbine/src/glfw/clipboard.cpp index e23d3ce7..855c4512 100644 --- a/src/olympic/turbine/src/glfw/clipboard.cpp +++ b/src/olympic/turbine/src/glfw/clipboard.cpp @@ -26,8 +26,8 @@ void setClipboardObject(Context &ctx, ox::UPtr &&obj) noexc ctx.clipboard = std::move(obj); } -ox::Result getClipboardData(Context &ctx, ox::StringView typeName, int typeVersion) noexcept { - if (ctx.clipboard && ctx.clipboard->typeMatch(typeName, typeVersion)) { +ox::Result getClipboardData(Context &ctx, ox::StringView typeId) noexcept { + if (ctx.clipboard && ctx.clipboard->typeMatch(typeId)) { return ctx.clipboard.get(); } return OxError(1);