Run clang-format
This commit is contained in:
@@ -1,31 +1,20 @@
|
||||
void atm::getting_pin()
|
||||
void
|
||||
atm::getting_pin()
|
||||
{
|
||||
incoming.wait()
|
||||
.handle<digit_pressed>(
|
||||
[&](digit_pressed const& msg)
|
||||
{
|
||||
unsigned const pin_length=4;
|
||||
pin+=msg.digit;
|
||||
if(pin.length()==pin_length)
|
||||
{
|
||||
bank.send(verify_pin(account,pin,incoming));
|
||||
state=&atm::verifying_pin;
|
||||
}
|
||||
}
|
||||
)
|
||||
.handle<clear_last_pressed>(
|
||||
[&](clear_last_pressed const& msg)
|
||||
{
|
||||
if(!pin.empty())
|
||||
{
|
||||
pin.resize(pin.length()-1);
|
||||
}
|
||||
}
|
||||
)
|
||||
.handle<cancel_pressed>(
|
||||
[&](cancel_pressed const& msg)
|
||||
{
|
||||
state=&atm::done_processing;
|
||||
}
|
||||
);
|
||||
incoming.wait()
|
||||
.handle<digit_pressed>([&](digit_pressed const& msg) {
|
||||
unsigned const pin_length = 4;
|
||||
pin += msg.digit;
|
||||
if (pin.length() == pin_length) {
|
||||
bank.send(verify_pin(account, pin, incoming));
|
||||
state = &atm::verifying_pin;
|
||||
}
|
||||
})
|
||||
.handle<clear_last_pressed>([&](clear_last_pressed const& msg) {
|
||||
if (!pin.empty()) {
|
||||
pin.resize(pin.length() - 1);
|
||||
}
|
||||
})
|
||||
.handle<cancel_pressed>(
|
||||
[&](cancel_pressed const& msg) { state = &atm::done_processing; });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user