diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-04-26 10:20:02 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-05-02 12:37:24 +0200 |
commit | fa9abf968840745e428a86a9545aaa6c923415e2 (patch) | |
tree | eb2be0e61c35cb5360c6c652b80a2e23ef04f43e /src/init.cpp | |
parent | 9d1a286f20b8a602ffe72928bcd79be09fdbf9d0 (diff) |
refactor: Avoid unused-variable warning in init.cpp
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp index d7bdd49b70..1e6d296551 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1297,7 +1297,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) } } - for (const auto &port_option : std::vector<std::pair<std::string, bool>>{ + for ([[maybe_unused]] const auto& [arg, unix] : std::vector<std::pair<std::string, bool>>{ // arg name UNIX socket support {"-i2psam", false}, {"-onion", true}, @@ -1309,10 +1309,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) {"-zmqpubhashtx", true}, {"-zmqpubrawblock", true}, {"-zmqpubrawtx", true}, - {"-zmqpubsequence", true} + {"-zmqpubsequence", true}, }) { - const std::string arg{port_option.first}; - const bool unix{port_option.second}; for (const std::string& socket_addr : args.GetArgs(arg)) { std::string host_out; uint16_t port_out{0}; |