clean up some opAssigns
This commit is contained in:
parent
c85cbdaac0
commit
1e3f629265
|
@ -137,19 +137,6 @@ private struct Pair
|
||||||
return cmp!(Yes.useTag)(rhs) == 0;
|
return cmp!(Yes.useTag)(rhs) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Assignment (shallow copy) by value.
|
|
||||||
void opAssign(Pair rhs) @safe nothrow
|
|
||||||
{
|
|
||||||
opAssign(rhs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Assignment (shallow copy) by reference.
|
|
||||||
void opAssign(ref Pair rhs) @safe nothrow
|
|
||||||
{
|
|
||||||
key = rhs.key;
|
|
||||||
value = rhs.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Comparison with another Pair.
|
// Comparison with another Pair.
|
||||||
//
|
//
|
||||||
|
@ -861,13 +848,7 @@ struct Node
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Assignment (shallow copy) by value.
|
/// Assignment (shallow copy) by value.
|
||||||
void opAssign(Node rhs) @safe nothrow
|
void opAssign()(auto ref Node rhs)
|
||||||
{
|
|
||||||
opAssign(rhs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Assignment (shallow copy) by reference.
|
|
||||||
void opAssign(ref Node rhs) @safe nothrow
|
|
||||||
{
|
{
|
||||||
assumeWontThrow(setValue(rhs.value_));
|
assumeWontThrow(setValue(rhs.value_));
|
||||||
startMark_ = rhs.startMark_;
|
startMark_ = rhs.startMark_;
|
||||||
|
|
Loading…
Reference in a new issue