random9e7de4c1·5 ปีที่แล้ว·discussI agree with your point for small size data structures. But in general, and in the case of the OP source code, he doesn't even need to copy its arguments to pass them by value, he should pass them via a const reference, and just pass the address.
random9e7de4c1·5 ปีที่แล้ว·discussPassing by value can be fine for small size structs, but it is not the common practice.I expected to see any of this function to use const reference.For general guidelines on parameters passing (and other guideilines), the C++ core guidelines are pretty useful for those who want to learn:https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...
random9e7de4c1·5 ปีที่แล้ว·discussI am curious to know why every single in function parameters in this project are passed by value. Too much RAM left unused in our modern desktops?