Skip to content

Commit

Permalink
add various moves
Browse files Browse the repository at this point in the history
More efficient

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Mar 14, 2023
1 parent 518c52c commit e2bf207
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bmffimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down
8 changes: 4 additions & 4 deletions src/epsimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/psdimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e2bf207

Please sign in to comment.