File src/Config.cpp changed (mode: 100644) (index 08265cc..9079d42) |
... |
... |
Config::get(const std::string &key) |
43 |
43 |
std::string val; |
std::string val; |
44 |
44 |
try { |
try { |
45 |
45 |
val = props.get<std::string>(key); |
val = props.get<std::string>(key); |
46 |
|
} catch (boost::property_tree::ptree_bad_path &) { |
|
|
46 |
|
} catch (pt::ptree_bad_path &) { |
47 |
47 |
if (parent == nullptr) { |
if (parent == nullptr) { |
48 |
48 |
throw; |
throw; |
49 |
49 |
} |
} |
|
... |
... |
Config::list(const std::string &path) |
71 |
71 |
{ |
{ |
72 |
72 |
ensureLoaded(); |
ensureLoaded(); |
73 |
73 |
|
|
74 |
|
boost::optional<boost::property_tree::ptree &> subtree = |
|
75 |
|
props.get_child_optional(path); |
|
|
74 |
|
boost::optional<pt::ptree &> subtree = props.get_child_optional(path); |
76 |
75 |
if (!subtree) { |
if (!subtree) { |
77 |
76 |
return (parent == nullptr) |
return (parent == nullptr) |
78 |
77 |
? std::vector<std::string>() |
? std::vector<std::string>() |