function NewPing(trigger_pin, echo_pin, max_cm_distance=MAX_SENSOR_DISTANCE)
Yup, that's pretty much how you would do it in NewPing.h.
NewPing(int trigger_pin, int echo_pin, int max_cm_distance = MAX_SENSOR_DISTANCE);
Even if you couldn't consolidate in this way, you should always factor the common code into a single function.
I think of false as not the same as zero
The C/C++ paradigm is that zero is false, and everything else is true.