common: fix build failure
This commit is contained in:
parent
386faa9315
commit
72885addf1
|
|
@ -28,6 +28,10 @@
|
||||||
#include <light/ltface.hh>
|
#include <light/ltface.hh>
|
||||||
#include <common/bsputils.hh>
|
#include <common/bsputils.hh>
|
||||||
|
|
||||||
|
entdict_t::entdict_t(std::initializer_list<keyvalue_t> l) : keyvalues(l) {}
|
||||||
|
|
||||||
|
entdict_t::entdict_t() = default;
|
||||||
|
|
||||||
const std::string& entdict_t::get(const std::string& key) const {
|
const std::string& entdict_t::get(const std::string& key) const {
|
||||||
if (auto it = find(key); it != keyvalues.end()) {
|
if (auto it = find(key); it != keyvalues.end()) {
|
||||||
return it->second;
|
return it->second;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <initializer_list>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
@ -30,6 +31,9 @@ using keyvalues_t = std::vector<keyvalue_t>;
|
||||||
class entdict_t {
|
class entdict_t {
|
||||||
keyvalues_t keyvalues;
|
keyvalues_t keyvalues;
|
||||||
public:
|
public:
|
||||||
|
entdict_t(std::initializer_list<keyvalue_t> l);
|
||||||
|
entdict_t();
|
||||||
|
|
||||||
const std::string& get(const std::string& key) const;
|
const std::string& get(const std::string& key) const;
|
||||||
void set(const std::string& key, const std::string& value);
|
void set(const std::string& key, const std::string& value);
|
||||||
void remove(const std::string& key);
|
void remove(const std::string& key);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue