commit | a0b8496016dcd98dc9b8086f0d22b14efb7e48f2 | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Tue Aug 29 17:46:19 2017 -0700 |
committer | George Burgess IV <gbiv@google.com> | Tue Aug 29 17:46:44 2017 -0700 |
tree | 869dcf8871d50fddba95b3da280b5b42e69c40d2 | |
parent | 0fdeb09e898c39d9e353311577b72f1a53bc11f3 [diff] |
libcameraservice: fix static analyzer complaints Due to https://bugs.llvm.org/show_bug.cgi?id=34365, the static analyzer complains about use of copied `sp`s. In this case, the copy is entirely unnecessary, since we're just going to destroy the copied-from sp anyway. Speed things up a bit + appease the analyzer by moving instead. Bug: 27101951 Test: mma. Static analyzer no longer complains. Change-Id: I148212e418cb3f8728383db92b564523525b633a
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp index 5addaf1..a02090b 100644 --- a/services/camera/libcameraservice/common/CameraProviderManager.cpp +++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -1339,7 +1339,7 @@ desc->mReverseMapping[reverseIndex]->add(desc->mTagToNameMap.valueFor(tag), tag); } - descriptor = desc; + descriptor = std::move(desc); return OK; }