From 36a35ec27158cbefd64791cbd081b476306c7ed1 Mon Sep 17 00:00:00 2001 From: terukazu inoue Date: Thu, 27 Apr 2023 20:45:42 +0900 Subject: [PATCH] fix: `next` is not emitted if `error` and `complete` are omitted --- include/another-rxcpp/observer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/another-rxcpp/observer.h b/include/another-rxcpp/observer.h index 956f267..b9ed547 100644 --- a/include/another-rxcpp/observer.h +++ b/include/another-rxcpp/observer.h @@ -73,9 +73,9 @@ template struct observer { observer(const next_t& n = {}, const error_t& e = {}, const completed_t& c = {}) noexcept { inner_ = std::make_shared(); - if(n) inner_->next_ = std::make_shared(n); - if(e) inner_->error_ = std::make_shared(e); - if(c) inner_->completed_ = std::make_shared(c); + inner_->next_ = std::make_shared(n); + inner_->error_ = std::make_shared(e); + inner_->completed_ = std::make_shared(c); } void on_next(const value_type& value) const noexcept {