mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 10:42:46 +01:00
Make Bech32 LocateErrors return error list rather than using out-arg
This commit is contained in:
@@ -188,13 +188,9 @@ CTxDestination DecodeDestination(const std::string& str, const CChainParams& par
|
||||
}
|
||||
|
||||
// Perform Bech32 error location
|
||||
if (!error_locations) {
|
||||
std::vector<int> dummy_errors;
|
||||
error_str = bech32::LocateErrors(str, dummy_errors);
|
||||
} else {
|
||||
error_str = bech32::LocateErrors(str, *error_locations);
|
||||
}
|
||||
|
||||
auto res = bech32::LocateErrors(str);
|
||||
error_str = res.first;
|
||||
if (error_locations) *error_locations = std::move(res.second);
|
||||
return CNoDestination();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user