Skip to content

Commit

Permalink
clang-tidy cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Bryson <[email protected]>
  • Loading branch information
davebryson committed Jun 2, 2022
1 parent b6993d5 commit 7e1922d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/uhs/atomizer/sentinel/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace cbdc::sentinel {

// If the tx has no inputs, it's a mint. Send it directly to one of the
// shards
if(ctx.m_inputs.size() == 0) {
if(ctx.m_inputs.empty()) {
auto ctx_pkt
= std::make_shared<cbdc::buffer>(cbdc::make_buffer(ctx));
if(!m_shard_network.send_to_one(ctx_pkt)) {
Expand Down
2 changes: 1 addition & 1 deletion src/uhs/client/client-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ auto mint_command(cbdc::client& client, const std::vector<std::string>& args)
/// Generate a demo wallet for use with demo. It creates a minter public key
/// to match the value pre-configued in the provided 'cfg' files.
///
/// Example use: client-cli <wallet file name> demowallet
/// Example use: client-cli 'wallet file name' demowallet
auto generate_demo_minter_wallet(const std::vector<std::string>& args)
-> bool {
const auto wallet_file = args[1];
Expand Down
2 changes: 1 addition & 1 deletion src/uhs/transaction/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace cbdc::transaction::validation {
auto check_tx(const cbdc::transaction::full_tx& tx,
const cbdc::config::options& options)
-> std::optional<tx_error> {
if(tx.m_inputs.size() == 0) {
if(tx.m_inputs.empty()) {
return check_mint_tx(tx, options);
}

Expand Down
7 changes: 3 additions & 4 deletions src/uhs/transaction/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,12 @@ namespace cbdc {
}

auto transaction::wallet::generate_minter_key() -> const pubkey_t {
if(m_pubkeys.size() == 0) {
if(m_pubkeys.empty()) {
// new wallet. create the minter key
return generate_key();
} else {
// first key is always the minter key
return m_pubkeys[0];
}
// first key is always the minter key
return m_pubkeys[0];
}

auto transaction::wallet::generate_test_minter_key() -> pubkey_t {
Expand Down

0 comments on commit 7e1922d

Please sign in to comment.