diff --git a/src/bmffimage.cpp b/src/bmffimage.cpp index 41d30fe137..af94c208f0 100644 --- a/src/bmffimage.cpp +++ b/src/bmffimage.cpp @@ -669,7 +669,7 @@ void BmffImage::parseCr3Preview(const DataBuf& data, std::ostream& out, bool bTr return "image/jpeg"; return "application/octet-stream"; }(); - nativePreviews_.push_back(nativePreview); + nativePreviews_.push_back(std::move(nativePreview)); if (bTrace) { out << Internal::stringFormat("width,height,size = %zu,%zu,%zu", nativePreview.width_, nativePreview.height_, diff --git a/src/epsimage.cpp b/src/epsimage.cpp index 03362b4252..2f68f1c179 100644 --- a/src/epsimage.cpp +++ b/src/epsimage.cpp @@ -755,7 +755,7 @@ void readWriteEpsMetadata(BasicIo& io, std::string& xmpPacket, NativePreviewList EXV_WARNING << "Unable to handle Illustrator thumbnail data type: " << type << "\n"; #endif } else { - nativePreviews.push_back(nativePreview); + nativePreviews.push_back(std::move(nativePreview)); } } if (posEndPhotoshop != posEndEps) { @@ -766,7 +766,7 @@ void readWriteEpsMetadata(BasicIo& io, std::string& xmpPacket, NativePreviewList nativePreview.height_ = 0; nativePreview.filter_ = "hex-irb"; nativePreview.mimeType_ = "image/jpeg"; - nativePreviews.push_back(nativePreview); + nativePreviews.push_back(std::move(nativePreview)); } if (sizeWmf != 0) { NativePreview nativePreview; @@ -776,7 +776,7 @@ void readWriteEpsMetadata(BasicIo& io, std::string& xmpPacket, NativePreviewList nativePreview.height_ = 0; nativePreview.filter_ = ""; nativePreview.mimeType_ = "image/x-wmf"; - nativePreviews.push_back(nativePreview); + nativePreviews.push_back(std::move(nativePreview)); } if (sizeTiff != 0) { NativePreview nativePreview; @@ -786,7 +786,7 @@ void readWriteEpsMetadata(BasicIo& io, std::string& xmpPacket, NativePreviewList nativePreview.height_ = 0; nativePreview.filter_ = ""; nativePreview.mimeType_ = "image/tiff"; - nativePreviews.push_back(nativePreview); + nativePreviews.push_back(std::move(nativePreview)); } } else { // check for Adobe Illustrator 8.0 or older diff --git a/src/preview.cpp b/src/preview.cpp index e686df08c7..ea121f14b7 100644 --- a/src/preview.cpp +++ b/src/preview.cpp @@ -1025,7 +1025,7 @@ PreviewPropertiesList PreviewManager::getPreviewProperties() const { PreviewProperties props = loader->getProperties(); DataBuf buf = loader->getData(); // #16 getPreviewImage() props.size_ = buf.size(); // update the size - list.push_back(props); + list.push_back(std::move(props)); } } std::sort(list.begin(), list.end(), cmpPreviewProperties); diff --git a/src/psdimage.cpp b/src/psdimage.cpp index 72e416b0b9..3ac075f473 100644 --- a/src/psdimage.cpp +++ b/src/psdimage.cpp @@ -296,7 +296,7 @@ void PsdImage::readResourceBlock(uint16_t resourceId, uint32_t resourceSize) { if (format == 1) { nativePreview.filter_ = ""; nativePreview.mimeType_ = "image/jpeg"; - nativePreviews_.push_back(nativePreview); + nativePreviews_.push_back(std::move(nativePreview)); } else { // unsupported format of native preview }