From 0c6fd08bea31fa94aebd68285c2b1aa7997eb7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffan=20S=C3=B8lvsten?= Date: Sat, 13 Apr 2024 00:00:01 +0200 Subject: [PATCH] Add move-assignment to Mtbdd class Again, nothing is really gained from doing so except more code. --- src/sylvan_obj.cpp | 7 +++++++ src/sylvan_obj.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/src/sylvan_obj.cpp b/src/sylvan_obj.cpp index 1503a215..fc4199f5 100644 --- a/src/sylvan_obj.cpp +++ b/src/sylvan_obj.cpp @@ -754,6 +754,13 @@ Mtbdd::operator=(const Mtbdd& right) return *this; } +Mtbdd& +Mtbdd::operator=(Mtbdd&& right) +{ + mtbdd = right.mtbdd; + return *this; +} + Mtbdd Mtbdd::operator!() const { diff --git a/src/sylvan_obj.hpp b/src/sylvan_obj.hpp index e118ad5c..294fafe9 100644 --- a/src/sylvan_obj.hpp +++ b/src/sylvan_obj.hpp @@ -717,6 +717,7 @@ class Mtbdd { bool operator==(const Mtbdd& other) const; bool operator!=(const Mtbdd& other) const; Mtbdd& operator=(const Mtbdd& right); + Mtbdd& operator=(Mtbdd&& right); Mtbdd operator!() const; Mtbdd operator~() const; Mtbdd operator*(const Mtbdd& other) const;