Add missing is_set() implementation.

This commit is contained in:
King_DuckZ 2020-04-13 19:04:28 +02:00
parent 01e40d297e
commit a2b31dfd28

View file

@ -263,6 +263,17 @@ void EnvReal::unset (std::string_view name) noexcept {
}
bool EnvReal::is_set (std::string_view name) const noexcept {
auto& pm = pointer_map();
std::lock_guard<std::mutex> lock(pm.env_mutex());
return duck::invoke_with_zstr(
name,
m_name_buff.get(),
m_name_buff_len,
[](const char* name, std::size_t) -> bool {
return nullptr == name;
}
);
}
auto EnvReal::size() const noexcept -> size_type {