Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Accept kAlreadyProcessed as success by default.
Browse files Browse the repository at this point in the history
I've yet to encounter a case when that status would not imply success,
and you can still control the success boolean if desired with the
three-parameter constructor.

Signed-off-by: Patrick Vacek <[email protected]>
  • Loading branch information
pattivacek committed Jun 17, 2020
1 parent 0eb02d4 commit 1310543
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libaktualizr/utilities/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ std::ostream& operator<<(std::ostream& os, const ResultCode& result_code);
struct InstallationResult {
InstallationResult() = default;
InstallationResult(ResultCode result_code_in, std::string description_in)
: success(result_code_in.num_code == ResultCode::Numeric::kOk),
: success(result_code_in.num_code == ResultCode::Numeric::kOk ||
result_code_in.num_code == ResultCode::Numeric::kAlreadyProcessed),
result_code(std::move(result_code_in)),
description(std::move(description_in)) {}
InstallationResult(bool success_in, ResultCode result_code_in, std::string description_in)
Expand Down

0 comments on commit 1310543

Please sign in to comment.