Skip to content

Commit

Permalink
try fix unix compil disable templated function in ParameterLink
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Oct 22, 2023
1 parent 25540b8 commit 2566801
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Source/ParameterLink/ParameterLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,29 @@ class ParamLinkContainer :

virtual void linkUpdated(ParameterLink* p) override;

template<class T>
T* getLinkedTargetAs(TargetParameter* target, Prop* p)
{
if (target == nullptr) return nullptr;

if (paramsCanBeLinked)
{
if (ParameterLink* pl = getLinkedParam(target)) return dynamic_cast<T*>(pl->getLinkedTarget(prop.get()));
}

return dynamic_cast<T*>(target->target.get());
}

template<class T>
T* getLinkedTargetContainerAs(TargetParameter* target, Prop* prop)
{
if (paramsCanBeLinked)
{
if (ParameterLink* pl = getLinkedParam(target)) return dynamic_cast<T*>(pl->getLinkedTargetContainer(prop).get());
}

return dynamic_cast<T*>(target->targetContainer.get());
}
//template<class T>
//T* getLinkedTargetAs(TargetParameter* target, Prop* p)
//{
// if (target == nullptr) return nullptr;

// if (paramsCanBeLinked)
// {
// if (ParameterLink* pl = getLinkedParam(target)) return dynamic_cast<T*>(pl->getLinkedTarget(prop.get()));
// }

// return dynamic_cast<T*>(target->target.get());
//}

//template<class T>
//T* getLinkedTargetContainerAs(TargetParameter* target, Prop* prop)
//{
// if (paramsCanBeLinked)
// {
// if (ParameterLink* pl = getLinkedParam(target)) return dynamic_cast<T*>(pl->getLinkedTargetContainer(prop).get());
// }

// return dynamic_cast<T*>(target->targetContainer.get());
//}

class ParamLinkContainerListener
{
Expand Down

0 comments on commit 2566801

Please sign in to comment.