nobleo / path_tracking_pid

Path Tracking PID offers a tuneable PID control loop, decouling steering and forward velocity
Apache License 2.0
130 stars 37 forks source link

Refactored mandatory ptr parameter to reference. #76

Closed lewie-donckers closed 2 years ago

lewie-donckers commented 2 years ago

Refactored a mandatory (nullptr is not allowed) pointer parameter to a reference.

See:

Rayman commented 2 years ago

Google style guide (and cpplint) used to recommend output parameters to be pointer so that you can see an argument is modified:

foo(x, y);     // x and y won't be mutated
bar(x, &y);    // y may be mutated

But I can't find it in the style guide anymore, is this rule outdated? https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs

lewie-donckers commented 2 years ago

But I can't find it in the style guide anymore, is this rule outdated?

I hope so. ;-D