Skip to content

Commit

Permalink
fix: next is not emitted if error and complete are omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
terukazu-inoue committed Apr 27, 2023
1 parent e06ed6d commit 36a35ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/another-rxcpp/observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ template <typename T> struct observer {

observer(const next_t& n = {}, const error_t& e = {}, const completed_t& c = {}) noexcept {
inner_ = std::make_shared<inner>();
if(n) inner_->next_ = std::make_shared<next_t>(n);
if(e) inner_->error_ = std::make_shared<error_t>(e);
if(c) inner_->completed_ = std::make_shared<completed_t>(c);
inner_->next_ = std::make_shared<next_t>(n);
inner_->error_ = std::make_shared<error_t>(e);
inner_->completed_ = std::make_shared<completed_t>(c);
}

void on_next(const value_type& value) const noexcept {
Expand Down

0 comments on commit 36a35ec

Please sign in to comment.