Skip to content

Commit

Permalink
tidy up construction in singleton accesor
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed Apr 16, 2024
1 parent 3b78c8d commit 9b95834
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/package.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Package::Ptr Package::Create(std::string name, double fill_min, double fill_max,
Package::Ptr& Package::unpackaged() {

if (!unpackaged_) {
Ptr p(new Package(unpackaged_name_));
unpackaged_ = p;
unpackaged_ = Ptr(new Package(unpackaged_name_));
}

return unpackaged_;
Expand Down

0 comments on commit 9b95834

Please sign in to comment.