> + // 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
> + // 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()) alarms_ by_scancode. emplace( >create_ alarm( timeout( code);
> + existing_timer = repeat_
> + std::make_pair(
> + code,
> + alarm_factory-
> + [this, code]()
> + {
> + this->handle_
> + })
> + )
> + ).first;
>
> braces around multi-line if statement
>
> + mtd::MockAlarm * alarm = new mtd::MockAlarm;
> needs delete/unique_ptr?
ack