Mir

Code review comment for lp:~robertcarr/mir/receive-input-in-client

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> >> 822 + static const bool consume_batches = true;
> >> 823 + static const bool do_not_consume_batches = false;
> ...
> >> 825 + static const bool handle_event = true;
> >> 826 + static const bool do_not_handle_event = false;
>
> >> As far as I'm aware we've not been using this pattern elsewhere in the
> code? I'm not particularly against >> it, though.
>
> These come from a long series of reviews on an original version of
> AndroidInputReceiver back in november...I do not have strong opinions though I
> do think they make the implementation read in a rather literate style.

Where are we using it here? I find no use of "do_not_handle_event" in the MP.

It is better to use "enum class BatchMode { do_not_consume_batches, consume_batches };" - which allows type checking on parameters.

review: Needs Fixing

« Back to merge proposal