]> git.sesse.net Git - cubemap/blobdiff - config.cpp
Replace map with unordered_map nearly everywhere, for speed.
[cubemap] / config.cpp
index 5a1fdd9ba367e13be0dec4ac4014b56624598ae1..21e17c988d7137b68b7b4c869fcffb077a3da3cf 100644 (file)
@@ -7,9 +7,9 @@
 #include <string.h>
 #include <net/if.h>
 #include <sys/socket.h>
-#include <map>
 #include <string>
 #include <utility>
+#include <unordered_map>
 #include <vector>
 
 #include "tlse.h"
@@ -26,7 +26,7 @@ using namespace std;
 struct ConfigLine {
        string keyword;
        vector<string> arguments;
-       map<string, string> parameters;
+       unordered_map<string, string> parameters;
 };
 
 namespace {
@@ -211,7 +211,7 @@ bool load_file_to_string(const string &filename, size_t max_size, string *conten
        return true;
 }
 
-bool parse_tls_parameters(const map<string, string> &parameters, AcceptorConfig *acceptor)
+bool parse_tls_parameters(const unordered_map<string, string> &parameters, AcceptorConfig *acceptor)
 {
        bool has_cert = false, has_key = false;