From 7dc2dea45ba778c4e01fd52e55b351a900dde7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 7 Dec 2021 15:48:00 +0100 Subject: [PATCH] Trade: make AnimationData object reference 64-bit. To align with the new SceneData. --- src/Magnum/Trade/AnimationData.cpp | 2 +- src/Magnum/Trade/AnimationData.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Magnum/Trade/AnimationData.cpp b/src/Magnum/Trade/AnimationData.cpp index 930c9c2c8..a120ab2c7 100644 --- a/src/Magnum/Trade/AnimationData.cpp +++ b/src/Magnum/Trade/AnimationData.cpp @@ -92,7 +92,7 @@ AnimationTrackTargetType AnimationData::trackTargetType(UnsignedInt id) const { return _tracks[id]._targetType; } -UnsignedInt AnimationData::trackTarget(UnsignedInt id) const { +UnsignedLong AnimationData::trackTarget(UnsignedInt id) const { CORRADE_ASSERT(id < _tracks.size(), "Trade::AnimationData::trackTarget(): index out of range", {}); return _tracks[id]._target; } diff --git a/src/Magnum/Trade/AnimationData.h b/src/Magnum/Trade/AnimationData.h index 7c54cfbd3..bed8e9f45 100644 --- a/src/Magnum/Trade/AnimationData.h +++ b/src/Magnum/Trade/AnimationData.h @@ -238,14 +238,14 @@ class AnimationTrackData { * @param target Track target * @param view Type-erased @ref Animation::TrackView instance */ - explicit AnimationTrackData(AnimationTrackType type, AnimationTrackType resultType, AnimationTrackTargetType targetType, UnsignedInt target, Animation::TrackViewStorage view) noexcept: _type{type}, _resultType{resultType}, _targetType{targetType}, _target{target}, _view{view} {} + explicit AnimationTrackData(AnimationTrackType type, AnimationTrackType resultType, AnimationTrackTargetType targetType, UnsignedLong target, Animation::TrackViewStorage view) noexcept: _type{type}, _resultType{resultType}, _targetType{targetType}, _target{target}, _view{view} {} /** @overload * * Equivalent to the above with @p type used as both value type and * result type. */ - explicit AnimationTrackData(AnimationTrackType type, AnimationTrackTargetType targetType, UnsignedInt target, Animation::TrackViewStorage view) noexcept: _type{type}, _resultType{type}, _targetType{targetType}, _target{target}, _view{view} {} + explicit AnimationTrackData(AnimationTrackType type, AnimationTrackTargetType targetType, UnsignedLong target, Animation::TrackViewStorage view) noexcept: _type{type}, _resultType{type}, _targetType{targetType}, _target{target}, _view{view} {} /** * @brief Constructor @@ -257,14 +257,14 @@ class AnimationTrackData { * Detects @ref AnimationTrackType from @p view type and delegates to * @ref AnimationTrackData(AnimationTrackType, AnimationTrackType, AnimationTrackTargetType, UnsignedInt, Animation::TrackViewStorage). */ - template explicit AnimationTrackData(AnimationTrackTargetType targetType, UnsignedInt target, Animation::TrackView view) noexcept; + template explicit AnimationTrackData(AnimationTrackTargetType targetType, UnsignedLong target, Animation::TrackView view) noexcept; private: friend AnimationData; AnimationTrackType _type, _resultType; AnimationTrackTargetType _targetType; - UnsignedInt _target; + UnsignedLong _target; Animation::TrackViewStorage _view; }; @@ -512,7 +512,7 @@ class MAGNUM_TRADE_EXPORT AnimationData { * @see @ref trackCount(), @ref AbstractImporter::object2D(), * @ref AbstractImporter::object3D() */ - UnsignedInt trackTarget(UnsignedInt id) const; + UnsignedLong trackTarget(UnsignedInt id) const; /** * @brief Track data storage @@ -649,7 +649,7 @@ namespace Implementation { /* LCOV_EXCL_STOP */ } -template inline AnimationTrackData::AnimationTrackData(AnimationTrackTargetType targetType, UnsignedInt target, Animation::TrackView view) noexcept: AnimationTrackData{Implementation::animationTypeFor(), Implementation::animationTypeFor(), targetType, target, view} {} +template inline AnimationTrackData::AnimationTrackData(AnimationTrackTargetType targetType, UnsignedLong target, Animation::TrackView view) noexcept: AnimationTrackData{Implementation::animationTypeFor(), Implementation::animationTypeFor(), targetType, target, view} {} template const Animation::TrackView& AnimationData::track(UnsignedInt id) const { const Animation::TrackViewStorage& storage = track(id);