swebb2066 commented on pull request #96:
URL: https://github.com/apache/logging-log4cxx/pull/96#issuecomment-1006239373
It occurred to me that RVO is only relevent for functions that create the
returned object. getEffectiveLevel() returns the LevelPtr held by theLogger.
--
This is an aut
swebb2066 commented on pull request #96:
URL: https://github.com/apache/logging-log4cxx/pull/96#issuecomment-1005192530
To prevent unnecessary locks in #90 it was necessary to change the return
type of getEffectiveLevel() to a const reference. So RVO probably does not
happen for virtual fu
swebb2066 commented on pull request #96:
URL: https://github.com/apache/logging-log4cxx/pull/96#issuecomment-1004441759
To copy a shared_ptr the reference count must be incremented, for which a
lock must be acquired.
By returning a const reference, the caller can decide whether to co