diff --git a/.clang-tidy b/.clang-tidy index 451697a3..f82aa962 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -9,6 +9,7 @@ Checks: "-*,\ -misc-const-correctness,\ modernize-*,\ -modernize-avoid-c-arrays,\ + -modernize-use-designated-initializers,\ -modernize-use-trailing-return-type,\ performance-*,\ portability-*,\ diff --git a/src/api-objects/src/recentdeposit.cpp b/src/api-objects/src/recentdeposit.cpp index 20cf0561..012761da 100644 --- a/src/api-objects/src/recentdeposit.cpp +++ b/src/api-objects/src/recentdeposit.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "cct_log.hpp" diff --git a/src/api/common/include/commonapi.hpp b/src/api/common/include/commonapi.hpp index 50c6ab53..cbca7458 100644 --- a/src/api/common/include/commonapi.hpp +++ b/src/api/common/include/commonapi.hpp @@ -14,6 +14,7 @@ #include "currencycodevector.hpp" #include "exchangebase.hpp" #include "monetaryamount.hpp" +#include "monetaryamountbycurrencyset.hpp" #include "timedef.hpp" #include "withdrawalfees-crawler.hpp" diff --git a/src/api/common/src/binance-common-api.cpp b/src/api/common/src/binance-common-api.cpp index a5c294da..21b0436f 100644 --- a/src/api/common/src/binance-common-api.cpp +++ b/src/api/common/src/binance-common-api.cpp @@ -1,18 +1,26 @@ #include "binance-common-api.hpp" #include +#include #include #include #include #include "abstractmetricgateway.hpp" +#include "cachedresult.hpp" #include "cct_json.hpp" #include "cct_log.hpp" #include "cct_string.hpp" #include "curlhandle.hpp" #include "curlpostdata.hpp" #include "currencycode.hpp" +#include "currencycodeset.hpp" +#include "currencyexchange.hpp" +#include "currencyexchangeflatset.hpp" +#include "httprequesttype.hpp" +#include "monetary-amount-vector.hpp" #include "monetaryamount.hpp" +#include "monetaryamountbycurrencyset.hpp" #include "permanentcurloptions.hpp" #include "request-retry.hpp" #include "runmodes.hpp" diff --git a/src/api/common/src/commonapi.cpp b/src/api/common/src/commonapi.cpp index 4a897530..1a63ca81 100644 --- a/src/api/common/src/commonapi.cpp +++ b/src/api/common/src/commonapi.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -13,8 +14,10 @@ #include "curloptions.hpp" #include "currencycode.hpp" #include "currencycodeset.hpp" +#include "currencycodevector.hpp" #include "file.hpp" #include "httprequesttype.hpp" +#include "monetaryamountbycurrencyset.hpp" #include "permanentcurloptions.hpp" #include "timedef.hpp" #include "withdrawalfees-crawler.hpp" diff --git a/src/api/common/src/exchangeprivateapi.cpp b/src/api/common/src/exchangeprivateapi.cpp index 3998c0ee..e5317352 100644 --- a/src/api/common/src/exchangeprivateapi.cpp +++ b/src/api/common/src/exchangeprivateapi.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,7 @@ #include "tradeoptions.hpp" #include "tradeside.hpp" #include "unreachable.hpp" +#include "wallet.hpp" #include "withdraw.hpp" #include "withdrawinfo.hpp" #include "withdrawoptions.hpp" @@ -609,7 +611,7 @@ ReceivedWithdrawInfo ExchangePrivate::queryWithdrawDelivery( return {}; } const Deposit &deposit = deposits[closestDepositPos]; - return ReceivedWithdrawInfo(string(deposit.id()), deposit.amount(), deposit.time()); + return {string(deposit.id()), deposit.amount(), deposit.time()}; } SentWithdrawInfo ExchangePrivate::isWithdrawSuccessfullySent(const InitiatedWithdrawInfo &initiatedWithdrawInfo) { diff --git a/src/api/common/src/ssl_sha.cpp b/src/api/common/src/ssl_sha.cpp index 671144f7..c516b1e1 100644 --- a/src/api/common/src/ssl_sha.cpp +++ b/src/api/common/src/ssl_sha.cpp @@ -6,6 +6,8 @@ #include #include +#include +#include #include #include #include diff --git a/src/engine/src/exchangesorchestrator.cpp b/src/engine/src/exchangesorchestrator.cpp index 4030028c..7132175f 100644 --- a/src/engine/src/exchangesorchestrator.cpp +++ b/src/engine/src/exchangesorchestrator.cpp @@ -20,7 +20,6 @@ #include "cct_smallvector.hpp" #include "cct_string.hpp" #include "cct_type_traits.hpp" -#include "commonapi.hpp" #include "currencycode.hpp" #include "currencycodeset.hpp" #include "currencyexchangeflatset.hpp" diff --git a/src/http-request/src/besturlpicker.cpp b/src/http-request/src/besturlpicker.cpp index 3f3e1431..79616efd 100644 --- a/src/http-request/src/besturlpicker.cpp +++ b/src/http-request/src/besturlpicker.cpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include "cct_log.hpp" #include "mathhelpers.hpp" diff --git a/src/objects/src/monetaryamount.cpp b/src/objects/src/monetaryamount.cpp index 2c5ac5a4..75de8a25 100644 --- a/src/objects/src/monetaryamount.cpp +++ b/src/objects/src/monetaryamount.cpp @@ -134,7 +134,7 @@ inline auto AmountIntegralFromStr(std::string_view amountStr, bool heuristicRoun integerPart = 0; } else { integerPart = - FromString(std::string_view(amountStr.data(), amountStr.data() + dotPos)); + FromString(std::string_view(amountStr.begin(), amountStr.begin() + dotPos)); } } diff --git a/src/tech/test/cachedresult_test.cpp b/src/tech/test/cachedresult_test.cpp index dc38f7a8..d60436c0 100644 --- a/src/tech/test/cachedresult_test.cpp +++ b/src/tech/test/cachedresult_test.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "cachedresultvault.hpp" #include "timedef.hpp" diff --git a/src/tech/test/url-encode_test.cpp b/src/tech/test/url-encode_test.cpp index e5521a91..48d66cfc 100644 --- a/src/tech/test/url-encode_test.cpp +++ b/src/tech/test/url-encode_test.cpp @@ -2,6 +2,8 @@ #include +#include + #include "cct_cctype.hpp" namespace cct {