Skip to content

Commit

Permalink
temporary fix to a linker error on windows (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: hugofloresgarcia <[email protected]>
  • Loading branch information
hugofloresgarcia and hugofloresgarcia authored Mar 2, 2023
1 parent a488549 commit 37f4f87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/effects/Effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ bool Effect::SupportsAutomation() const
return true;
}

std::shared_ptr<EffectInstance> StatefulEffect::MakeInstance() const
{
// Cheat with const-cast to return an object that calls through to
// non-const methods of a stateful effect.
// Stateless effects should override this function and be really const
// correct.
return std::make_shared<Instance>(const_cast<StatefulEffect&>(*this));
}
// std::shared_ptr<EffectInstance> StatefulEffect::MakeInstance() const
// {
// // Cheat with const-cast to return an object that calls through to
// // non-const methods of a stateful effect.
// // Stateless effects should override this function and be really const
// // correct.
// return std::make_shared<Instance>(const_cast<StatefulEffect&>(*this));
// }

const EffectParameterMethods &Effect::Parameters() const
{
Expand Down
8 changes: 7 additions & 1 deletion src/effects/Effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,13 @@ class StatefulEffect
SampleCount GetLatency(
const EffectSettings &settings, double sampleRate) const override;
};
std::shared_ptr<EffectInstance> MakeInstance() const override;
std::shared_ptr<EffectInstance> MakeInstance() const override {
// Cheat with const-cast to return an object that calls through to
// non-const methods of a stateful effect.
// Stateless effects should override this function and be really const
// correct.
return std::make_shared<Instance>(const_cast<StatefulEffect&>(*this));
};
};

// FIXME:
Expand Down

0 comments on commit 37f4f87

Please sign in to comment.