From 2740969f948dcf1e27d1a23dd1e45afadbf9857e Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 1 Nov 2018 15:14:02 +0100 Subject: Use template args for the class, not on the find method. --- juniper/src/vespa/juniper/stringmap.cpp | 2 +- juniper/src/vespa/juniper/stringmap.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'juniper/src') diff --git a/juniper/src/vespa/juniper/stringmap.cpp b/juniper/src/vespa/juniper/stringmap.cpp index a65350432fd..f673f22e29c 100644 --- a/juniper/src/vespa/juniper/stringmap.cpp +++ b/juniper/src/vespa/juniper/stringmap.cpp @@ -10,7 +10,7 @@ void Fast_StringMap::Insert(const char* key, const char* value) const char * -Fast_StringMap::Lookup(const char *key, const char *defval) +Fast_StringMap::Lookup(const char *key, const char *defval) const { Map::const_iterator found(_backing.find(key)); return (found != _backing.end()) ? found->second.c_str() : defval; diff --git a/juniper/src/vespa/juniper/stringmap.h b/juniper/src/vespa/juniper/stringmap.h index c202ecb5888..068eeaf3d16 100644 --- a/juniper/src/vespa/juniper/stringmap.h +++ b/juniper/src/vespa/juniper/stringmap.h @@ -10,10 +10,10 @@ class Fast_StringMap { private: - typedef vespalib::hash_map Map; + using Map = vespalib::hash_map; Map _backing; public: void Insert(const char* key, const char* value); - const char *Lookup(const char* key, const char* defval); + const char *Lookup(const char* key, const char* defval) const; }; -- cgit v1.2.3