I want to be able to do this:
void buttonClicked (Button* b)
if (ownedArray.contains (b)) function (ownedArray.indexOf (b));
However, the OwnedArray methods require a const Button pointer. Const cast doesn’t seem to work either as you can’t cast to base type button. Is there / what’s the best way round this?