Merge bitcoin/bitcoin#25153: scripted-diff: Use getInt<T> over get_int/get_int64

fa9af21878 scripted-diff: Use getInt<T> over get_int/get_int64 (MacroFake)

Pull request description:

  Seems better to see the return type directly and be able to modify it easier, as the return type is used for exceptions (in-range checking and parsing feedback).

ACKs for top commit:
  fanquake:
    ACK fa9af21878

Tree-SHA512: 284aa2527d0f663ca01550115025c9c64c787531d595f866c718f6ad09b9b0cac1e683a7d77f8009b75de990fd37166b44063ffa83fba8a04e9a31600b4c2725
This commit is contained in:
fanquake committed 2022-05-19 16:32:56 +01:00
commit 0de36941ec
32 files changed
+114 -114

No files matched your search

+1 -1
View File
@@ -457,7 +457,7 @@ void RPCExecutor::request(const QString &command, const WalletModel* wallet_mode
{
try // Nice formatting for standard-format error
{
int code = find_value(objError, "code").get_int();
int code = find_value(objError, "code").getInt<int>();
std::string message = find_value(objError, "message").get_str();
Q_EMIT reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")");
}