mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Added a Visual Studio compiler bug workaround
This commit is contained in:
parent
aecb819985
commit
f990723d6f
1 changed files with 7 additions and 1 deletions
|
|
@ -600,8 +600,14 @@ GraphEditorPanel::ConnectorComponent* GraphEditorPanel::getComponentForConnectio
|
|||
GraphEditorPanel::PinComponent* GraphEditorPanel::findPinAt (Point<float> pos) const
|
||||
{
|
||||
for (auto* fc : nodes)
|
||||
if (auto* pin = dynamic_cast<PinComponent*> (fc->getComponentAt (pos.toInt() - fc->getPosition())))
|
||||
{
|
||||
// NB: A Visual Studio optimiser error means we have to put this Component* in a local
|
||||
// variable before trying to cast it, or it gets mysteriously optimised away..
|
||||
auto* comp = fc->getComponentAt (pos.toInt() - fc->getPosition());
|
||||
|
||||
if (auto* pin = dynamic_cast<PinComponent*> (comp))
|
||||
return pin;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue