From 8a4b3d40a6a1f52b897a0ac49605c1b708e01876 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Tue, 29 Aug 2017 15:26:19 -0700 Subject: [PATCH] img_utils: 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: I08f77c2509dc03a919238b97666be3f458ba7cf3 --- media/img_utils/src/TiffWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/img_utils/src/TiffWriter.cpp b/media/img_utils/src/TiffWriter.cpp index 564474f72d..1711242a97 100644 --- a/media/img_utils/src/TiffWriter.cpp +++ b/media/img_utils/src/TiffWriter.cpp @@ -350,7 +350,7 @@ sp TiffWriter::findLastIfd() { if (nextIfd == NULL) { break; } - ifd = nextIfd; + ifd = std::move(nextIfd); } return ifd; }