ros_best_practices
ros_best_practices copied to clipboard
Add example where virtual call is appropriate
Sometimes virtual functions are costly, sometimes not. Show both examples in this repo.
As suggested in #23 by @peci1:
Virtual functions might be costly if the function is called often. Maybe the code could have a non-virtual function OftenCalledFunction and a virtual NotSoOftenCalledFunction. But that decision is on you.