Use forward_list over list

This commit is contained in:
Michael 2019-02-11 16:38:56 +00:00
parent 67b5d48095
commit 8dc4ffbae7
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}))

View File

@ -1,14 +1,15 @@
#ifndef LLARP_CONFIG_HPP
#define LLARP_CONFIG_HPP
#include <list>
#include <forward_list>
#include <string>
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;