config/Block: add method SetUsed()
This commit is contained in:
parent
987b60ae73
commit
ef38330d74
@ -94,6 +94,10 @@ struct ConfigBlock {
|
|||||||
return block_params.empty();
|
return block_params.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetUsed() const noexcept {
|
||||||
|
used = true;
|
||||||
|
}
|
||||||
|
|
||||||
template<typename N, typename V>
|
template<typename N, typename V>
|
||||||
gcc_nonnull_all
|
gcc_nonnull_all
|
||||||
void AddBlockParam(N &&_name, V &&_value, int _line=-1) noexcept {
|
void AddBlockParam(N &&_name, V &&_value, int _line=-1) noexcept {
|
||||||
|
@ -85,7 +85,7 @@ config_get_block(ConfigBlockOption option) noexcept
|
|||||||
{
|
{
|
||||||
const auto *block = config_data.blocks[unsigned(option)];
|
const auto *block = config_data.blocks[unsigned(option)];
|
||||||
if (block != nullptr)
|
if (block != nullptr)
|
||||||
block->used = true;
|
block->SetUsed();
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user