diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-12-19 15:24:02 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-12-19 15:24:02 +0100 |
commit | c44433dad279aa8ad95fc936ce5d3c671fbf9aa3 (patch) | |
tree | ea03fa09e688a36f8e75f137954e60b762404b2a /src/modules/m_httpd_stats.cpp | |
parent | 6d25ad273c7fd1d21b9c392678f3472eb53c6e83 (diff) | |
parent | 7010a92426d2c3ab0cea5ba0d36a04bc6b52349f (diff) |
Merge branch 'master+flatmap'
Diffstat (limited to 'src/modules/m_httpd_stats.cpp')
-rw-r--r-- | src/modules/m_httpd_stats.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 84cca7e01..30eacd7a7 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -27,7 +27,7 @@ class ModuleHttpStats : public Module { - static std::map<char, char const*> const &entities; + static const insp::flat_map<char, char const*>& entities; HTTPdAPI API; public: @@ -43,7 +43,7 @@ class ModuleHttpStats : public Module for (std::string::const_iterator x = str.begin(); x != str.end(); ++x) { - std::map<char, char const*>::const_iterator it = entities.find(*x); + insp::flat_map<char, char const*>::const_iterator it = entities.find(*x); if (it != entities.end()) { @@ -241,9 +241,9 @@ class ModuleHttpStats : public Module } }; -static std::map<char, char const*> const &init_entities() +static const insp::flat_map<char, char const*>& init_entities() { - static std::map<char, char const*> entities; + static insp::flat_map<char, char const*> entities; entities['<'] = "lt"; entities['>'] = "gt"; entities['&'] = "amp"; @@ -251,6 +251,6 @@ static std::map<char, char const*> const &init_entities() return entities; } -std::map<char, char const*> const &ModuleHttpStats::entities = init_entities (); +const insp::flat_map<char, char const*>& ModuleHttpStats::entities = init_entities(); MODULE_INIT(ModuleHttpStats) |