+147
−148
File changed.
Preview size limit exceeded, changes collapsed.
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Storing sp<> return values in a const ref to temporary seems like an outdated way to avoid an additional copy, if that was indeed the original intention to optimize. Avoid storing the sp<> return value in a const ref to avoid confusion with returning a reference (which is dangerous as it allows access without the lock). Instead store the sp<> return value in a const lvalue to invoke copy elision which is guaranteed in C++17. Test: atest CtsMediaAudioTestCases Bug: 326504627 Change-Id: I3e34f01be0d9b85289ff88e0bc289eec833b5348
File changed.
Preview size limit exceeded, changes collapsed.