diff --git a/src/function_group.hh b/src/function_group.hh index bafdab27..2772389c 100644 --- a/src/function_group.hh +++ b/src/function_group.hh @@ -44,15 +44,15 @@ public: return *group; } - CandidateList complete_id(const String& prefix, ByteCount cursor_pos) + CandidateList complete_id(const String& prefix, ByteCount cursor_pos) const { return m_functions.complete_id(prefix, cursor_pos); } - CandidateList complete_group_id(const String& prefix, ByteCount cursor_pos) + CandidateList complete_group_id(const String& prefix, ByteCount cursor_pos) const { return m_functions.complete_id_if( - prefix, cursor_pos, [](FunctionAndId& func) { + prefix, cursor_pos, [](const FunctionAndId& func) { return func.second.template target() != nullptr; }); } diff --git a/src/idvaluemap.hh b/src/idvaluemap.hh index e11c327a..b2cebb1d 100644 --- a/src/idvaluemap.hh +++ b/src/idvaluemap.hh @@ -66,7 +66,7 @@ public: template CandidateList complete_id_if(const String& prefix, ByteCount cursor_pos, - _Condition condition) + _Condition condition) const { String real_prefix = prefix.substr(0, cursor_pos); CandidateList result; @@ -83,7 +83,7 @@ public: } CandidateList complete_id(const String& prefix, - ByteCount cursor_pos) + ByteCount cursor_pos) const { return complete_id_if( prefix, cursor_pos, [](const value_type&) { return true; });