Correcting ledger's CHECK use

There has been some changes upstream on these macros recently, which
have slightly changed their semantics. This commit corrects the use of
DCHECK in the ledger code, to satisfy the compiler.
This commit is contained in:
Claudio DeSouza
2022-12-15 14:18:49 -05:00
committed by Max Karolinskiy
parent f5fb33238a
commit 79fa65e33f
2 changed files with 7 additions and 4 deletions
@@ -18,8 +18,9 @@ namespace ledger {
namespace endpoint {
namespace uphold {
GetCapabilities::GetCapabilities(LedgerImpl* ledger)
: ledger_((DCHECK(ledger), ledger)) {}
GetCapabilities::GetCapabilities(LedgerImpl* ledger) : ledger_(ledger) {
DCHECK(ledger_);
}
GetCapabilities::~GetCapabilities() = default;
@@ -18,9 +18,11 @@ namespace ledger {
namespace promotion {
PromotionTransfer::PromotionTransfer(LedgerImpl* ledger)
: ledger_((DCHECK(ledger), ledger)),
: ledger_(ledger),
credentials_(
std::make_unique<credential::CredentialsPromotion>(ledger_)) {}
std::make_unique<credential::CredentialsPromotion>(ledger_)) {
DCHECK(ledger_);
}
PromotionTransfer::~PromotionTransfer() = default;