Make StatusParagraph::find_installed() const
MODIFY
include/StatusParagraphs.h
include/StatusParagraphs.h
@@ -20,7 +20,7 @@ namespace vcpkg
}
const_iterator find(const std::string& name, const triplet& target_triplet) const;
iterator find(const std::string& name, const triplet& target_triplet);
- iterator find_installed(const std::string& name, const triplet& target_triplet);
+ const_iterator find_installed(const std::string& name, const triplet& target_triplet) const;
iterator insert(std::unique_ptr<StatusParagraph>);

MODIFY
src/StatusParagraphs.cpp
src/StatusParagraphs.cpp
@@ -29,9 +29,9 @@ namespace vcpkg
});
}
- StatusParagraphs::iterator StatusParagraphs::find_installed(const std::string& name, const triplet& target_triplet)
+ StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const triplet& target_triplet) const
{
- auto it = find(name, target_triplet);
+ const const_iterator it = find(name, target_triplet);
if (it != end() && (*it)->want == want_t::install)
{
return it;

Make StatusParagraph::find_installed() const