Skip to content

Commit

Permalink
move ImgData object
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray committed Jun 16, 2018
1 parent a43a693 commit 283db10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/imgcat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void _readdir(const ImgMetaParser& metaparser_, ImgIdx& idx_, const char* thumb
DLOG(path);
if (st.st_mode & S_IFREG && _filterextn(extn_, path)) {
const Img img = metaparser_.parse(path, st, thumbpath_);
idx_[img.key].push_back(img.data);
idx_[img.key].emplace_back(std::move(img.data));
}
}
}
Expand Down Expand Up @@ -506,7 +506,7 @@ int main(int argc, char **argv)
try
{
const Img img = exifparser.parse(i.filename.c_str(), i.st, thumbpath);
idxs.back()[img.key].push_back(img.data);
idxs.back()[img.key].emplace_back(std::move(img.data));
}
catch (const std::invalid_argument& ex)
{
Expand All @@ -520,7 +520,7 @@ int main(int argc, char **argv)
try
{
const Img img = avfmtparser.parse(i.filename.c_str(), i.st, thumbpath);
idxs.back()[img.key].push_back(img.data);
idxs.back()[img.key].emplace_back(std::move(img.data));
}
catch (const std::exception& ex)
{
Expand Down

0 comments on commit 283db10

Please sign in to comment.