During fixes for #32 #24 you introduced manual null pointer checks for as<TrackIfaceP>
and so on. I don't believe that this is the best approach; so I here is a suggestion of how I think it should be done.
I would recommend replacing each invocation of as<>
with bse_cast<>
, even if in some cases this will be a little longer:
casting track object
old: track ? track->as<TrackIfaceP>() : NULL;
new: bse_cast<TrackIfaceP> (track);
casting this object
old: as<TrackIfaceP>();
new: bse_cast<TrackIfaceP> (this);
However, I still think my version is the better API, because
Its a bit of work to do the details and replace all cases where this is used, but if you want to go this way, I can provide a complete patch which eliminates as<>() completely.
https://github.com/tim-janik/beast/pull/34
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.