[Merge] lp:~phablet-team/mir/track-plug-state into lp:mir
Alan Griffiths
alan at octopull.co.uk
Fri Feb 12 11:42:02 UTC 2016
Review: Needs Information
I'm not very familiar with this code, so I may be missing something?
It seems excessive to have both inclusion in a map and a bool to represent the "plugged" state. And there are at most three elements!
Surely either a set (membership in the set implying the "plugged" state) or a three element array would be adequate.
E.g.
bool is_plugged_map[3] = { false, false, false };
...
if (!is_plugged_map[display_name]) return {};
(It would be nice to eliminate the "magic number" 3 by adding a DisplayName::max_names)
--
https://code.launchpad.net/~phablet-team/mir/track-plug-state/+merge/285854
Your team Ubuntu Phablet Team is subscribed to branch lp:~phablet-team/mir/track-plug-state.
More information about the Ubuntu-reviews
mailing list