From 9571c69b51115454c6a699be9492024f7b46c2b4 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 23 Jun 2021 16:34:36 -0400 Subject: Add bilingual_str::clear() --- src/util/translation.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/util/translation.h b/src/util/translation.h index 99899ef3c2..62388b568c 100644 --- a/src/util/translation.h +++ b/src/util/translation.h @@ -28,6 +28,12 @@ struct bilingual_str { { return original.empty(); } + + void clear() + { + original.clear(); + translated.clear(); + } }; inline bilingual_str operator+(bilingual_str lhs, const bilingual_str& rhs) -- cgit v1.2.3 From 171366e89b828a557f8262d9dc14ff7a03f813f7 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 23 Jun 2021 16:54:13 -0400 Subject: Use bilingual_str for address fetching functions For GetNewDestination, GetNewChangeDestination, and GetReservedDestination, use bilingual_str for errors --- src/test/util/wallet.cpp | 3 ++- src/wallet/interfaces.cpp | 3 ++- src/wallet/rpcwallet.cpp | 8 ++++---- src/wallet/scriptpubkeyman.cpp | 24 ++++++++++++------------ src/wallet/scriptpubkeyman.h | 12 ++++++------ src/wallet/spend.cpp | 4 ++-- src/wallet/test/coinselector_tests.cpp | 3 ++- src/wallet/test/wallet_tests.cpp | 2 +- src/wallet/wallet.cpp | 10 +++++----- src/wallet/wallet.h | 6 +++--- 10 files changed, 39 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp index fd6012e9fe..061659818f 100644 --- a/src/test/util/wallet.cpp +++ b/src/test/util/wallet.cpp @@ -8,6 +8,7 @@ #include #include