mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Removed an old VC6 workaround from Component::findParentComponentOfClass. If you were using its old dummy parameter, just tweak your code to call it using a templated type instead.
This commit is contained in:
parent
584c444ffd
commit
72db44a138
1 changed files with 1 additions and 5 deletions
|
|
@ -785,14 +785,10 @@ public:
|
|||
For example findParentComponentOfClass \<MyComp\>() would return the first parent
|
||||
component that can be dynamically cast to a MyComp, or will return 0 if none
|
||||
of the parents are suitable.
|
||||
|
||||
N.B. The dummy parameter is needed to work around a VC6 compiler bug.
|
||||
*/
|
||||
template <class TargetClass>
|
||||
TargetClass* findParentComponentOfClass (TargetClass* const dummyParameter = nullptr) const
|
||||
TargetClass* findParentComponentOfClass() const
|
||||
{
|
||||
(void) dummyParameter;
|
||||
|
||||
for (Component* p = parentComponent; p != nullptr; p = p->parentComponent)
|
||||
{
|
||||
TargetClass* const target = dynamic_cast <TargetClass*> (p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue