Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up manipulatory assignment operators #605

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/adiar/bdd/bdd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

bdd& bdd::operator&= (bdd &&other)
{
__bdd&& temp = bdd_and(*this, other);
__bdd temp = bdd_and(*this, other);
other.deref();
return (*this = std::move(temp));
}
Expand All @@ -108,7 +108,7 @@

bdd& bdd::operator|= (bdd &&other)
{
__bdd&& temp = bdd_or(*this, other);
__bdd temp = bdd_or(*this, other);

Check warning on line 111 in src/adiar/bdd/bdd.cpp

View check run for this annotation

Codecov / codecov/patch

src/adiar/bdd/bdd.cpp#L111

Added line #L111 was not covered by tests
other.deref();
return (*this = std::move(temp));
}
Expand All @@ -120,7 +120,7 @@

bdd& bdd::operator^= (bdd &&other)
{
__bdd&& temp = bdd_xor(*this, other);
__bdd temp = bdd_xor(*this, other);

Check warning on line 123 in src/adiar/bdd/bdd.cpp

View check run for this annotation

Codecov / codecov/patch

src/adiar/bdd/bdd.cpp#L123

Added line #L123 was not covered by tests
other.deref();
return (*this = std::move(temp));
}
Expand Down
6 changes: 3 additions & 3 deletions src/adiar/zdd/zdd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace adiar

zdd& zdd::operator&= (zdd &&other)
{
__zdd&& temp = zdd_intsec(*this, other);
__zdd temp = zdd_intsec(*this, other);
other.deref();
return (*this = std::move(temp));
}
Expand All @@ -141,7 +141,7 @@ namespace adiar

zdd& zdd::operator|= (zdd &&other)
{
__zdd&& temp = zdd_union(*this, other);
__zdd temp = zdd_union(*this, other);
other.deref();
return (*this = std::move(temp));
}
Expand All @@ -158,7 +158,7 @@ namespace adiar

zdd& zdd::operator-= (zdd &&other)
{
__zdd&& temp = zdd_diff(*this, other);
__zdd temp = zdd_diff(*this, other);
other.deref();
return (*this = std::move(temp));
}
Expand Down
Loading