Skip to content

Commit fa9abf9

Browse files
author
MarcoFalke
committed
refactor: Avoid unused-variable warning in init.cpp
1 parent 9d1a286 commit fa9abf9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/init.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
12971297
}
12981298
}
12991299

1300-
for (const auto &port_option : std::vector<std::pair<std::string, bool>>{
1300+
for ([[maybe_unused]] const auto& [arg, unix] : std::vector<std::pair<std::string, bool>>{
13011301
// arg name UNIX socket support
13021302
{"-i2psam", false},
13031303
{"-onion", true},
@@ -1309,10 +1309,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
13091309
{"-zmqpubhashtx", true},
13101310
{"-zmqpubrawblock", true},
13111311
{"-zmqpubrawtx", true},
1312-
{"-zmqpubsequence", true}
1312+
{"-zmqpubsequence", true},
13131313
}) {
1314-
const std::string arg{port_option.first};
1315-
const bool unix{port_option.second};
13161314
for (const std::string& socket_addr : args.GetArgs(arg)) {
13171315
std::string host_out;
13181316
uint16_t port_out{0};

0 commit comments

Comments
 (0)