Skip to content

Commit

Permalink
Clean up and update ModelWarperV2 test suite slightly (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Nov 12, 2024
1 parent a34423d commit 0d9ddcf
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 39 deletions.
6 changes: 6 additions & 0 deletions src/OpenSimCreator/Utils/OpenSimHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,12 @@ namespace osc
return static_cast<T&>(AddComponent(c, static_cast<std::unique_ptr<OpenSim::Component>&&>(std::move(p))));
}

template<std::derived_from<OpenSim::Component> T>
T& AddComponent(OpenSim::Component& host)
{
return AddComponent(host, std::make_unique<T>());
}

template<std::derived_from<OpenSim::Component> T, typename... Args>
requires std::constructible_from<T, Args&&...>
T& AddComponent(OpenSim::Component& host, Args&&...args)
Expand Down
Loading

0 comments on commit 0d9ddcf

Please sign in to comment.