mirror of
https://github.com/NixOS/nix
synced 2025-07-06 00:51:47 +02:00
Merge pull request #11843 from xokdvium/dev/move-fixes
fix(treewide): clean up move semantics
This commit is contained in:
commit
aa9c0bc1ee
9 changed files with 15 additions and 17 deletions
|
@ -35,7 +35,7 @@ ExecutablePath ExecutablePath::parse(const OsString & path)
|
|||
std::make_move_iterator(strings.begin()),
|
||||
std::make_move_iterator(strings.end()),
|
||||
std::back_inserter(ret),
|
||||
[](auto && str) {
|
||||
[](OsString && str) {
|
||||
return fs::path{
|
||||
str.empty()
|
||||
// "A zero-length prefix is a legacy feature that
|
||||
|
|
|
@ -9,7 +9,7 @@ Pos::Pos(const Pos * other)
|
|||
}
|
||||
line = other->line;
|
||||
column = other->column;
|
||||
origin = std::move(other->origin);
|
||||
origin = other->origin;
|
||||
}
|
||||
|
||||
Pos::operator std::shared_ptr<Pos>() const
|
||||
|
|
|
@ -18,11 +18,6 @@ private:
|
|||
std::shared_ptr<T> p;
|
||||
|
||||
public:
|
||||
|
||||
ref(const ref<T> & r)
|
||||
: p(r.p)
|
||||
{ }
|
||||
|
||||
explicit ref(const std::shared_ptr<T> & p)
|
||||
: p(p)
|
||||
{
|
||||
|
@ -75,8 +70,6 @@ public:
|
|||
return ref<T2>((std::shared_ptr<T2>) p);
|
||||
}
|
||||
|
||||
ref<T> & operator=(ref<T> const & rhs) = default;
|
||||
|
||||
bool operator == (const ref<T> & other) const
|
||||
{
|
||||
return p == other.p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue