From a0c20a924acb497ea377367c1e8357afe06063bf Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 26 Sep 2016 22:59:02 +0100 Subject: [PATCH] OptionDescs are const in OptionRegistry --- src/option_manager.cc | 2 +- src/option_manager.hh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/option_manager.cc b/src/option_manager.cc index c510dff8..8d896514 100644 --- a/src/option_manager.cc +++ b/src/option_manager.cc @@ -115,7 +115,7 @@ void OptionManager::on_option_changed(const Option& option) CandidateList OptionsRegistry::complete_option_name(StringView prefix, ByteCount cursor_pos) const { - using OptionPtr = std::unique_ptr; + using OptionPtr = std::unique_ptr; return complete(prefix, cursor_pos, m_descs | filter([](const OptionPtr& desc) { return not (desc->flags() & OptionFlags::Hidden); }) | diff --git a/src/option_manager.hh b/src/option_manager.hh index cff6f34f..da7dd699 100644 --- a/src/option_manager.hh +++ b/src/option_manager.hh @@ -234,7 +234,7 @@ public: const OptionDesc* option_desc(StringView name) const { auto it = find_if(m_descs, - [&name](const std::unique_ptr& opt) + [&name](const std::unique_ptr& opt) { return opt->name() == name; }); return it != m_descs.end() ? it->get() : nullptr; } @@ -244,7 +244,7 @@ public: CandidateList complete_option_name(StringView prefix, ByteCount cursor_pos) const; private: OptionManager& m_global_manager; - Vector, MemoryDomain::Options> m_descs; + Vector, MemoryDomain::Options> m_descs; }; }