forked from lix-project/lix
f4ab297b31
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
23 lines
398 B
C++
23 lines
398 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
namespace nix {
|
|
|
|
const nlohmann::json * get(const nlohmann::json & map, const std::string & key)
|
|
{
|
|
auto i = map.find(key);
|
|
if (i == map.end()) return nullptr;
|
|
return &*i;
|
|
}
|
|
|
|
nlohmann::json * get(nlohmann::json & map, const std::string & key)
|
|
{
|
|
auto i = map.find(key);
|
|
if (i == map.end()) return nullptr;
|
|
return &*i;
|
|
}
|
|
|
|
}
|