File tree Expand file tree Collapse file tree 8 files changed +9
-8
lines changed Expand file tree Collapse file tree 8 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ using util::ToString;
5050// just use a plain system_clock.
5151using CliClock = std::chrono::system_clock;
5252
53- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
53+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
5454
5555static const char DEFAULT_RPCCONNECT[] = " 127.0.0.1" ;
5656static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900 ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ static bool fCreateBlank;
4141static std::map<std::string,UniValue> registers;
4242static const int CONTINUE_EXECUTION=-1 ;
4343
44- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
44+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
4545
4646static void SetupBitcoinTxArgs (ArgsManager &argsman)
4747{
Original file line number Diff line number Diff line change 2626
2727static const int CONTINUE_EXECUTION=-1 ;
2828
29- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
29+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
3030
3131static void SetupBitcoinUtilArgs (ArgsManager &argsman)
3232{
Original file line number Diff line number Diff line change 2626
2727using util::Join;
2828
29- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
29+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
3030
3131static void SetupWalletToolArgs (ArgsManager& argsman)
3232{
Original file line number Diff line number Diff line change 3434
3535using node::NodeContext;
3636
37- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
37+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
3838
3939#if HAVE_DECL_FORK
4040
Original file line number Diff line number Diff line change 11// Copyright (c) 2022 The Bitcoin Core developers
22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+ #include < util/translation.h>
45
56#include < functional>
67#include < string>
78
89// Define G_TRANSLATION_FUN symbol in libbitcoinkernel library so users of the
910// library aren't required to export this symbol
10- extern const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
11+ extern const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
Original file line number Diff line number Diff line change 1313#include < string>
1414
1515/* * Translate string to current locale using Qt. */
16- extern const std::function<std::string( const char *)> G_TRANSLATION_FUN = [](const char * psz) {
16+ extern const TranslateFn G_TRANSLATION_FUN = [](const char * psz) {
1717 return QCoreApplication::translate (" bitcoin-core" , psz).toStdString ();
1818};
1919
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ using node::LoadChainstate;
7272using node::RegenerateCommitments;
7373using node::VerifyLoadedChainstate;
7474
75- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
75+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
7676
7777constexpr inline auto TEST_DIR_PATH_ELEMENT{" test_common bitcoin" }; // Includes a space to catch possible path escape issues.
7878/* * Random context to get unique temp data dirs. Separate from m_rng, which can be seeded from a const env var */
You can’t perform that action at this time.
0 commit comments