Skip to content

Conversation

@kichithewolf
Copy link
Contributor

No description provided.

PA_ADD_OPTION(NOTIFICATIONS);
}

void CafeBuyer::purchase_water(SingleSwitchProgramEnvironment& env, ProControllerContext& context, bool& first){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're not modifying bool& first, you can just pass it by value.

send_program_status_notification(env, NOTIFICATION_STATUS);

round1 = false;
for (uint32_t i = 1; i < PURCHASES; i++){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than duplicating the body of this loop, you can initialize round1 to true as you do now, and set it at the end of the loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants