mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-07 14:18:18 +02:00
fabab69e9erefactor: Return std::optional from ParseDouble (MarcoFalke)fa0a09441drefactor: Return std::optional from GetWalletNameFromJSONRPCRequest (MarcoFalke)fafb0c4cberefactor: Return std::optional from GetLogCategory (MarcoFalke) Pull request description: Using a bool to indicate whether a mutable in-out param was written to is fine in legacy code, but otherwise confusing and brittle: * Sometimes the in-out-param is written to, even when the function returns `false`, like in `ParseDouble`. * Call sites must manually check the return value Fix those issues by returning `std::optional<_>` from `ParseDouble` (and a few other functions). This refactor is a style cleanup and does not change any behavior. ACKs for top commit: stickies-v: re-ACKfabab69e9ehodlinator: crACKfabab69e9erkrux: code review ACKfabab69e9eTree-SHA512: e27a27174e9d2200da8b0ca9b6cc056e94d2b25e6332975f1ad660ee85b02680a65ac93b2ed29f10da0ae5f6dc8395bddc9e973a3f925c68a0c8116c9282ea09