diff options
author | Max Kellermann <max@musicpd.org> | 2018-07-17 21:05:55 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-07-17 21:05:55 +0200 |
commit | 987b60ae73745f44b4aeb29f9eff740da9add334 (patch) | |
tree | 0d47aafc0c996729e0d219183ab7e94fa78646f6 | |
parent | 7db0f7c4dab1e3bd70ef5e3039299c33d4c8382a (diff) |
config/Block: make "used" mutable
-rw-r--r-- | src/config/Block.hxx | 2 | ||||
-rw-r--r-- | src/config/Global.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/config/Block.hxx b/src/config/Block.hxx index 01a41febf..ff8132d53 100644 --- a/src/config/Block.hxx +++ b/src/config/Block.hxx @@ -69,7 +69,7 @@ struct ConfigBlock { * This flag is false when nobody has queried the value of * this option yet. */ - bool used = false; + mutable bool used = false; explicit ConfigBlock(int _line=-1) :line(_line) {} diff --git a/src/config/Global.cxx b/src/config/Global.cxx index e929e0dbf..c154c8828 100644 --- a/src/config/Global.cxx +++ b/src/config/Global.cxx @@ -83,7 +83,7 @@ config_get_param(ConfigOption option) noexcept const ConfigBlock * config_get_block(ConfigBlockOption option) noexcept { - ConfigBlock *block = config_data.blocks[unsigned(option)]; + const auto *block = config_data.blocks[unsigned(option)]; if (block != nullptr) block->used = true; return block; |