Skip to content

Commit

Permalink
Remove unnecessary this capture for subjectss
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino authored and kirkshoop committed Nov 3, 2021
1 parent ec38393 commit 9075876
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Rx/v2/src/rxcpp/subjects/rx-behavior.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ class behavior

observable<T> get_observable() const {
auto keepAlive = s;
return make_observable_dynamic<T>([keepAlive, this](subscriber<T> o){
return make_observable_dynamic<T>([keepAlive](subscriber<T> o){
if (keepAlive.get_subscription().is_subscribed()) {
o.on_next(get_value());
o.on_next(keepAlive.get_value());
}
keepAlive.add(s.get_subscriber(), std::move(o));
keepAlive.add(keepAlive.get_subscriber(), std::move(o));
});
}
};
Expand Down
4 changes: 2 additions & 2 deletions Rx/v2/src/rxcpp/subjects/rx-replaysubject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class replay

observable<T> get_observable() const {
auto keepAlive = s;
auto observable = make_observable_dynamic<T>([keepAlive, this](subscriber<T> o){
for (auto&& value: get_values()) {
auto observable = make_observable_dynamic<T>([keepAlive](subscriber<T> o){
for (auto&& value: keepAlive.get_values()) {
o.on_next(value);
}
keepAlive.add(keepAlive.get_subscriber(), std::move(o));
Expand Down

0 comments on commit 9075876

Please sign in to comment.