martinzink commented on pull request #1081:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1081#issuecomment-848873724


   > I would pass `utils::optional<int8_t>` by value. 
`sizeof(utils::optional<int8_t>)` should be 2 and copying is not expensive.
   > 
   > As a rule of thumb, if `sizeof(T) <= 32` and copying doesn't incur 
allocation or other expensive operations, I would pass by value.
   > 
   > 
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cp31-pass-small-amounts-of-data-between-threads-by-value-rather-than-by-reference-or-pointer
   
   Changed it [aee9ab 
](https://github.com/martinzink/nifi-minifi-cpp/commit/aee9ab6b573cb5c5d699dfc5f7aee6d77015f64d)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to