summaryrefslogtreecommitdiffstats
path: root/juniper
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-11-01 15:14:02 +0100
committerHenning Baldersheim <balder@oath.com>2018-11-01 15:14:38 +0100
commit2740969f948dcf1e27d1a23dd1e45afadbf9857e (patch)
treece77435b6ea78c67d47de5d9587efa0203324cbf /juniper
parentd31a1b7f2df4ea94821a9d98754f4ae186bbf2d8 (diff)
Use template args for the class, not on the find method.
Diffstat (limited to 'juniper')
-rw-r--r--juniper/src/vespa/juniper/stringmap.cpp2
-rw-r--r--juniper/src/vespa/juniper/stringmap.h4
2 files changed, 3 insertions, 3 deletions
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<vespalib::string, vespalib::string> Map;
+ using Map = vespalib::hash_map<vespalib::string, vespalib::string>;
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;
};