Fix unnecessary copy initialization warnings
authorChih-Hung Hsieh <chh@google.com>
Fri, 13 Jul 2018 18:48:16 +0000 (11:48 -0700)
committerChih-Hung Hsieh <chh@google.com>
Fri, 13 Jul 2018 18:48:16 +0000 (11:48 -0700)
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I5de56c163d26e7522141ca06020321c481eea233

camera/common/1.0/default/VendorTagDescriptor.cpp

index bc182706058d76d51c569baa3626a811ab80b5b2..219d10c3c02d5a1164209c7d9cc9a99db0d46678 100644 (file)
@@ -258,7 +258,7 @@ status_t VendorTagDescriptor::createDescriptorFromOps(const vendor_tag_ops_t* vO
 
     for (size_t i = 0; i < static_cast<size_t>(tagCount); ++i) {
         uint32_t tag = tagArray[i];
-        String8 sectionString = tagToSectionMap.valueFor(tag);
+        const String8& sectionString = tagToSectionMap.valueFor(tag);
 
         // Set up tag to section index map
         ssize_t index = sections.indexOf(sectionString);