mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Convert some push_back to emplace_back
This commit is contained in:
parent
3c6d1b47f6
commit
075a8a6548
8 changed files with 12 additions and 12 deletions
|
|
@ -51,7 +51,7 @@ _create(const Branches::Ptr &ibranches_,
|
|||
if(info.spaceavail < branch.minfreespace())
|
||||
error_and_continue(error,ENOSPC);
|
||||
|
||||
obranches_.push_back(&branch);
|
||||
obranches_.emplace_back(&branch);
|
||||
}
|
||||
|
||||
if(obranches_.empty())
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ _search(const Branches::Ptr &branches_,
|
|||
if(!fs::exists(branch.path,fusepath_))
|
||||
continue;
|
||||
|
||||
paths_.push_back(&branch);
|
||||
paths_.emplace_back(&branch);
|
||||
}
|
||||
|
||||
if(paths_.empty())
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ _create(const Branches::Ptr &branches_,
|
|||
if(info.spaceavail < branch.minfreespace())
|
||||
error_and_continue(error,ENOSPC);
|
||||
|
||||
paths_.push_back(&branch);
|
||||
paths_.emplace_back(&branch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ _action(const Branches::Ptr &branches_,
|
|||
if(readonly)
|
||||
error_and_continue(error,EROFS);
|
||||
|
||||
paths_.push_back(&branch);
|
||||
paths_.emplace_back(&branch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ _search(const Branches::Ptr &branches_,
|
|||
if(!fs::exists(branch.path,fusepath_))
|
||||
continue;
|
||||
|
||||
paths_.push_back(&branch);
|
||||
paths_.emplace_back(&branch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ _create(const Branches::Ptr &branches_,
|
|||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.push_back(obranch);
|
||||
paths_.emplace_back(obranch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ _action(const Branches::Ptr &branches_,
|
|||
if(obranch == nullptr)
|
||||
return -error;
|
||||
|
||||
paths_.push_back(obranch);
|
||||
paths_.emplace_back(obranch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@ _search(const Branches::Ptr &branches_,
|
|||
if(obranch == nullptr)
|
||||
return -ENOENT;
|
||||
|
||||
paths_.push_back(obranch);
|
||||
paths_.emplace_back(obranch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ _create(const Branches::Ptr &branches_,
|
|||
if(obranch == nullptr)
|
||||
return -error;
|
||||
|
||||
paths_.push_back(obranch);
|
||||
paths_.emplace_back(obranch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ _create(const Branches::Ptr &branches_,
|
|||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.push_back(obranch);
|
||||
paths_.emplace_back(obranch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ _create(const Branches::Ptr &branches_,
|
|||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.push_back(obranch);
|
||||
paths_.emplace_back(obranch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ _create(const Branches::Ptr &branches_,
|
|||
if(!branch)
|
||||
return -error;
|
||||
|
||||
paths_.push_back(branch);
|
||||
paths_.emplace_back(branch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue