add various moves
More efficient Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
518c52c2af
commit
e2bf207477
@ -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_,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user