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;
50
50
// just use a plain system_clock.
51
51
using CliClock = std::chrono::system_clock;
52
52
53
- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
53
+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
54
54
55
55
static const char DEFAULT_RPCCONNECT[] = " 127.0.0.1" ;
56
56
static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900 ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ static bool fCreateBlank;
41
41
static std::map<std::string,UniValue> registers;
42
42
static const int CONTINUE_EXECUTION=-1 ;
43
43
44
- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
44
+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
45
45
46
46
static void SetupBitcoinTxArgs (ArgsManager &argsman)
47
47
{
Original file line number Diff line number Diff line change 26
26
27
27
static const int CONTINUE_EXECUTION=-1 ;
28
28
29
- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
29
+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
30
30
31
31
static void SetupBitcoinUtilArgs (ArgsManager &argsman)
32
32
{
Original file line number Diff line number Diff line change 26
26
27
27
using util::Join;
28
28
29
- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
29
+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
30
30
31
31
static void SetupWalletToolArgs (ArgsManager& argsman)
32
32
{
Original file line number Diff line number Diff line change 34
34
35
35
using node::NodeContext;
36
36
37
- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
37
+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
38
38
39
39
#if HAVE_DECL_FORK
40
40
Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2022 The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+ #include < util/translation.h>
4
5
5
6
#include < functional>
6
7
#include < string>
7
8
8
9
// Define G_TRANSLATION_FUN symbol in libbitcoinkernel library so users of the
9
10
// 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 13
13
#include < string>
14
14
15
15
/* * 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) {
17
17
return QCoreApplication::translate (" bitcoin-core" , psz).toStdString ();
18
18
};
19
19
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ using node::LoadChainstate;
72
72
using node::RegenerateCommitments;
73
73
using node::VerifyLoadedChainstate;
74
74
75
- const std::function<std::string( const char *)> G_TRANSLATION_FUN = nullptr ;
75
+ const TranslateFn G_TRANSLATION_FUN{ nullptr } ;
76
76
77
77
constexpr inline auto TEST_DIR_PATH_ELEMENT{" test_common bitcoin" }; // Includes a space to catch possible path escape issues.
78
78
/* * 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