config/Block: add method SetUsed()

This commit is contained in:
Max Kellermann 2018-07-17 21:05:17 +02:00
parent 987b60ae73
commit ef38330d74
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,10 @@ struct ConfigBlock {
return block_params.empty();
}
void SetUsed() const noexcept {
used = true;
}
template<typename N, typename V>
gcc_nonnull_all
void AddBlockParam(N &&_name, V &&_value, int _line=-1) noexcept {

View File

@ -85,7 +85,7 @@ config_get_block(ConfigBlockOption option) noexcept
{
const auto *block = config_data.blocks[unsigned(option)];
if (block != nullptr)
block->used = true;
block->SetUsed();
return block;
}