add note about generally passing built in types by value - for most compilers this should be faster

This commit is contained in:
Dane Springmeyer 2012-03-05 11:48:34 -08:00
parent 84c9ee653a
commit 7a9c5ac0ed

View file

@ -101,6 +101,12 @@ If you see bits of code around that do not follow these please don't hesitate to
std::string const& variable_name // no
#### Pass built-in types by value, all others by const&
void my_function(int double val); // if int, char, double, etc pass by value
void my_function(std::string const& val); // if std::string or user type, pass by const&
#### Shared pointers should be created with [boost::make_shared](http://www.boost.org/doc/libs/1_47_0/libs/smart_ptr/make_shared.html) where possible
#### Function definitions should not be separated from their arguments: