blob: 13d7bdee980aaf70a8b5787bdb4c85fa688b3396 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "stringmap.h"
void Fast_StringMap::Insert(const char* key, const char* value)
{
_backing[key] = value;
}
const char *
Fast_StringMap::Lookup(const char *key, const char *defval)
{
Map::const_iterator found(_backing.find(key));
return (found != _backing.end()) ? found->second.c_str() : defval;
}
|