Skip to content

Commit

Permalink
Use boost::shared ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Jan 26, 2023
1 parent e2f69e0 commit d00971d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gtsam/nonlinear/Values.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ namespace gtsam {
const_iterator_type it_;
deref_iterator(const_iterator_type it) : it_(it) {}
ConstKeyValuePair operator*() const { return {it_->first, *(it_->second)}; }
std::unique_ptr<ConstKeyValuePair> operator->() {
return std::make_unique<ConstKeyValuePair>(it_->first, *(it_->second));
boost::shared_ptr<ConstKeyValuePair> operator->() {
return boost::make_shared<ConstKeyValuePair>(it_->first, *(it_->second));
}
bool operator==(const deref_iterator& other) const {
return it_ == other.it_;
Expand Down

0 comments on commit d00971d

Please sign in to comment.