From 489cf935c64f73147d9d05f0fa3495ff860c39c4 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 2 Aug 2022 16:01:42 +0200 Subject: [PATCH] chore(CPP): use explicit initialization instead of zero initialization --- libs/StatusGoQt/src/StatusGo/Metadata/api_response.h | 2 +- .../StatusGoQt/src/StatusGo/Wallet/NetworkConfiguration.h | 8 ++++---- .../include/Status/Wallet/AccountAssetsController.h | 4 ++-- .../include/Status/Wallet/NewWalletAccountController.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/StatusGoQt/src/StatusGo/Metadata/api_response.h b/libs/StatusGoQt/src/StatusGo/Metadata/api_response.h index 6f67ae361d..7e5534afa3 100644 --- a/libs/StatusGoQt/src/StatusGo/Metadata/api_response.h +++ b/libs/StatusGoQt/src/StatusGo/Metadata/api_response.h @@ -32,7 +32,7 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ApiErrorResponse, error) * \note update NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE when changing structure's content */ struct JsonError { - int code{}; + int code{0}; std::string message; }; diff --git a/libs/StatusGoQt/src/StatusGo/Wallet/NetworkConfiguration.h b/libs/StatusGoQt/src/StatusGo/Wallet/NetworkConfiguration.h index e4cdf11045..bbb90cbd67 100644 --- a/libs/StatusGoQt/src/StatusGo/Wallet/NetworkConfiguration.h +++ b/libs/StatusGoQt/src/StatusGo/Wallet/NetworkConfiguration.h @@ -24,10 +24,10 @@ struct NetworkConfiguration std::optional iconUrl; std::optional nativeCurrencyName; std::optional nativeCurrencySymbol; - unsigned int nativeCurrencyDecimals{}; - bool isTest{}; - unsigned int layer{}; - bool enabled{}; + unsigned int nativeCurrencyDecimals{0}; + bool isTest{false}; + unsigned int layer{0}; + bool enabled{false}; QColor chainColor; QString shortName; }; diff --git a/libs/Wallet/include/Status/Wallet/AccountAssetsController.h b/libs/Wallet/include/Status/Wallet/AccountAssetsController.h index 7359f57cc3..f44774eb1a 100644 --- a/libs/Wallet/include/Status/Wallet/AccountAssetsController.h +++ b/libs/Wallet/include/Status/Wallet/AccountAssetsController.h @@ -47,8 +47,8 @@ private: using AssetModel = Helpers::QObjectVectorModel; std::shared_ptr m_assets; - float m_totalValue{}; - bool m_assetsReady{}; + float m_totalValue{0}; + bool m_assetsReady{false}; }; } // namespace Status::Wallet diff --git a/libs/Wallet/include/Status/Wallet/NewWalletAccountController.h b/libs/Wallet/include/Status/Wallet/NewWalletAccountController.h index a77c6a8ed1..1671006965 100644 --- a/libs/Wallet/include/Status/Wallet/NewWalletAccountController.h +++ b/libs/Wallet/include/Status/Wallet/NewWalletAccountController.h @@ -84,7 +84,7 @@ private: int m_derivedAddressIndex{0}; DerivedWalletAddressPtr m_selectedDerivedAddress; GoAccounts::DerivationPath m_derivationPath; - bool m_customDerivationPath{}; + bool m_customDerivationPath{false}; static constexpr int m_derivedAddressesPageSize{15}; static constexpr int m_maxDerivedAddresses{5 * m_derivedAddressesPageSize};