Commit 987b60ae authored by Max Kellermann's avatar Max Kellermann

config/Block: make "used" mutable

parent 7db0f7c4
...@@ -69,7 +69,7 @@ struct ConfigBlock { ...@@ -69,7 +69,7 @@ struct ConfigBlock {
* This flag is false when nobody has queried the value of * This flag is false when nobody has queried the value of
* this option yet. * this option yet.
*/ */
bool used = false; mutable bool used = false;
explicit ConfigBlock(int _line=-1) explicit ConfigBlock(int _line=-1)
:line(_line) {} :line(_line) {}
......
...@@ -83,7 +83,7 @@ config_get_param(ConfigOption option) noexcept ...@@ -83,7 +83,7 @@ config_get_param(ConfigOption option) noexcept
const ConfigBlock * const ConfigBlock *
config_get_block(ConfigBlockOption option) noexcept config_get_block(ConfigBlockOption option) noexcept
{ {
ConfigBlock *block = config_data.blocks[unsigned(option)]; const auto *block = config_data.blocks[unsigned(option)];
if (block != nullptr) if (block != nullptr)
block->used = true; block->used = true;
return block; return block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment