From 1e3f6292658b61a98c21a33e168078eaf4f17d24 Mon Sep 17 00:00:00 2001 From: Cameron Ross Date: Sun, 10 Jun 2018 01:15:45 -0300 Subject: [PATCH] clean up some opAssigns --- source/dyaml/node.d | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/source/dyaml/node.d b/source/dyaml/node.d index 7e2a488..565cdb6 100644 --- a/source/dyaml/node.d +++ b/source/dyaml/node.d @@ -137,19 +137,6 @@ private struct Pair 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: // Comparison with another Pair. // @@ -861,13 +848,7 @@ struct Node } /// Assignment (shallow copy) by value. - void opAssign(Node rhs) @safe nothrow - { - opAssign(rhs); - } - - /// Assignment (shallow copy) by reference. - void opAssign(ref Node rhs) @safe nothrow + void opAssign()(auto ref Node rhs) { assumeWontThrow(setValue(rhs.value_)); startMark_ = rhs.startMark_;