diff --git a/src/CFGFileParser.h b/src/CFGFileParser.h index 535acffe7dd9dbc3a4eb83fc00ad20212b773306..e783b879f8c01e61cc75a5d447ec8c73aecce2db 100644 --- a/src/CFGFileParser.h +++ b/src/CFGFileParser.h @@ -12,15 +12,17 @@ #include <cstdint> // let's try fast strings -typedef std::basic_string<char, std::char_traits<char>, ntr::TLSFAlloc<char>> fast_string; -namespace ntr{ size_t string_hash(const fast_string &str); bool fast_string_compare(fast_string t1, fast_string t2); } -typedef std::unordered_map<fast_string,fast_string,std::function<decltype(ntr::string_hash)>,std::function<decltype(ntr::fast_string_compare)>,ntr::TLSFAlloc<std::pair<const fast_string, fast_string>>> stringmap; - +namespace ntr{ + typedef std::basic_string<char, std::char_traits<char>, TLSFAlloc<char>> fast_string; + size_t string_hash(const fast_string &str); + bool fast_string_compare(fast_string t1, fast_string t2); + typedef std::unordered_map<fast_string,fast_string,std::function<decltype(ntr::string_hash)>,std::function<decltype(ntr::fast_string_compare)>,ntr::TLSFAlloc<std::pair<const fast_string, fast_string>>> stringmap; +} // Class which holds the parsed configuration options after // being processed by CFGFileParser. No longer a "trivial class" // just select by cfg->GlobalSettings.... struct BrowserConfiguration{ - stringmap GlobalSettings; + ntr::stringmap GlobalSettings; // fast allocation! static void* operator new(std::size_t n){ if (void *mem = tlsf_malloc(n)){