Skip to content

Commit 0a643ea

Browse files
committed
fix: small fix
1 parent 8bd90cb commit 0a643ea

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

include/lfmc/pipeline/pipeline.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ template <StochasticProcess SP, NumericalScheme<SP> NS> class Pipeline {
3232
return path_generator_->generate_paths(normals, steps, T);
3333
})
3434
.and_then([&](auto paths) { return payoff_->generate_payoffs(paths); })
35-
.and_then([&](auto payoffs) { return estimator_->add_payoffs(payoffs); })
36-
.or_else([](auto error) { return std::unexpected(error); });
35+
.and_then([&](auto payoffs) { return estimator_->add_payoffs(payoffs); });
36+
37+
if (!result) {
38+
return std::unexpected(result.error());
39+
}
3740
}
3841

3942
return estimator_->result();

0 commit comments

Comments
 (0)