summaryrefslogtreecommitdiff
path: root/src/neighbor/Glue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/neighbor/Glue.cxx')
-rw-r--r--src/neighbor/Glue.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/neighbor/Glue.cxx b/src/neighbor/Glue.cxx
index 5118f54a3..154e6331b 100644
--- a/src/neighbor/Glue.cxx
+++ b/src/neighbor/Glue.cxx
@@ -53,17 +53,16 @@ void
NeighborGlue::Init(const ConfigData &config,
EventLoop &loop, NeighborListener &listener)
{
- for (const auto *block = config.GetBlock(ConfigBlockOption::NEIGHBORS);
- block != nullptr; block = block->next) {
- block->SetUsed();
+ for (const auto &block : config.GetBlockList(ConfigBlockOption::NEIGHBORS)) {
+ block.SetUsed();
try {
explorers.emplace_front(CreateNeighborExplorer(loop,
listener,
- *block));
+ block));
} catch (...) {
std::throw_with_nested(FormatRuntimeError("Line %i: ",
- block->line));
+ block.line));
}
}
}