Skip to content

red-worker: Reduce casts needed in dispatcher handlers

Frediano Ziglio requested to merge fziglio/spice:mr_message_cast into master

Use a template to deduct type and avoid casts in every handler. The reinterpret_cast seems strong but is safe as converting a function with 2 typed pointers and a void return into a function with 2 void pointers and a void return. Associate the structure type with the message number to reduce types and mistakes.

Merge request reports

Loading