Assuming the following declaration
Vector GameSession::get_fade_point() const { return get_fade_point(Vector(0.0f, 0.0f)); } Vector GameSession::get_fade_point(const Vector& position) const { // Some code here }
What we can see is that these two function definitions can be rewritten to use default arguments as follows:
Vector GameSession::get_fade_point(const Vector& position = Vector(0.0f, 0.0f)) const { // Some code here }
I wonder if it makes sense for cppcheck to add such a check.
Thank you for the report. You can find the ticket here
Log in to post a comment.
Assuming the following declaration
What we can see is that these two function definitions can be rewritten to use default arguments as follows:
I wonder if it makes sense for cppcheck to add such a check.
Thank you for the report. You can find the ticket here