diff --git a/llarp/config.cpp b/llarp/config.cpp index dd2261492..52b6c257c 100644 --- a/llarp/config.cpp +++ b/llarp/config.cpp @@ -18,7 +18,7 @@ namespace llarp [&ret](const ConfigParser::Section_t &s) -> bool { for(const auto &item : s) { - ret.emplace_back(item.first, item.second); + ret.emplace_after(ret.end(), item.first, item.second); } return true; })) diff --git a/llarp/config.hpp b/llarp/config.hpp index 8f9e068f9..e16ff7a59 100644 --- a/llarp/config.hpp +++ b/llarp/config.hpp @@ -1,14 +1,15 @@ #ifndef LLARP_CONFIG_HPP #define LLARP_CONFIG_HPP -#include +#include #include namespace llarp { struct Config { - using section_t = std::list< std::pair< std::string, std::string > >; + using section_t = + std::forward_list< std::pair< std::string, std::string > >; section_t router; section_t network;