Skip to content

Commit

Permalink
interactor_impl: Remove an unused var and add const (#1848)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Dec 29, 2024
1 parent d4eb85a commit 93d7dee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/src/interactor_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1041,14 +1041,13 @@ std::vector<interaction_bind_t> interactor_impl::getBinds() const
std::pair<std::string, std::string> interactor_impl::getBindingDocumentation(
const interaction_bind_t& bind) const
{
std::vector<std::tuple<std::string, std::string, std::string>> doc;
auto it = this->Internals->Bindings.find(bind);
const auto& it = this->Internals->Bindings.find(bind);
if (it == this->Internals->Bindings.end())
{
throw interactor_impl::does_not_exists_exception(
std::string("Bind: ") + bind.format() + " does not exists");
}
auto docFunc = it->second.DocumentationCallback;
const auto& docFunc = it->second.DocumentationCallback;
return docFunc ? docFunc() : std::make_pair(std::string(), std::string());
}

Expand Down

0 comments on commit 93d7dee

Please sign in to comment.