Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ambiguous case for constructing pros::Task #182

Merged

Conversation

jm-spencer
Copy link
Contributor

@jm-spencer jm-spencer commented Nov 6, 2019

Summary:

There is an ambiguous case for construction of pros::Task when only 1 or 2 parameters are specified. This is fixed by removing the defaults on the 2nd and 3rd params.

Motivation:

As is, task construction when only the function and/or task parameter is specified is not allowed.

References (optional):

I accidentally introduced this in #158

Test Plan:

Make sure a Task object can be created while only specifying the function. Example:

void func(void* param){
    std::cout << "This task is running\n";
}

pros::Task task(func);
  • test item

@HotelCalifornia
Copy link
Contributor

I wonder how this interacts with #177

@jm-spencer
Copy link
Contributor Author

Looks like #177 doesn't interact with the shortened constructor at all.

Copy link
Member

@nathan-moore nathan-moore left a comment

Choose a reason for hiding this comment

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

There's no breaking change that I see, so looks good to me.

@HotelCalifornia HotelCalifornia merged commit 6b1acee into purduesigbots:develop Nov 10, 2019
@nathan-moore nathan-moore added this to the 3.2.1 milestone Jan 23, 2020
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.

3 participants