Mir

Code review comment for lp:~andreas-pokorny/mir/contact-info-as-extension

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, thanks.

I don't think the template function is necessary but it's not so important. I would have just made a lookup table:

typedef void (*FunPtr)();
static const struct
{
    char const* name;
    FunPtr* ptr;
} fun[] =
{
    {"libinput_event_touch_get_major_transformed", (FunPtr*)&get_touch_major},
    ...
};

And then loop through the array, indirectly filling out the pointed-to function pointers.

review: Approve

« Back to merge proposal