Mir

Code review comment for lp:~andreas-pokorny/mir/add-key-repeat-utility

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> + // destructor cancels the alarm
> + ~MockAlarm()
> + {
> + cancel();
> + }
> Seems specific to a test

But thats the behavior of Alarm objects..

> + if (existing_timer == repeat_alarms_by_scancode.end())
> + existing_timer = repeat_alarms_by_scancode.emplace(
> + std::make_pair(
> + code,
> + alarm_factory->create_alarm(
> + [this, code]()
> + {
> + this->handle_timeout(code);
> + })
> + )
> + ).first;
>
> braces around multi-line if statement
>
> + mtd::MockAlarm * alarm = new mtd::MockAlarm;
> needs delete/unique_ptr?

ack

« Back to merge proposal