diff options
| author | Jan HrubĂ˝ <jhruby.web@gmail.com> | 2017-03-13 08:56:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-13 08:56:05 +0100 |
| commit | 665f4118f603c5858217ed7a2f2f824b18ff4fc5 (patch) | |
| tree | f0167041edf71e90f2331b5025f603392a8de67a /toolsrc/include/StatusParagraphs.h | |
| parent | 1bec0fcb73073b5b1719f454c368a63f1bff625e (diff) | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.tar.gz vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.zip | |
Merge pull request #1 from Microsoft/master
pull
Diffstat (limited to 'toolsrc/include/StatusParagraphs.h')
| -rw-r--r-- | toolsrc/include/StatusParagraphs.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/StatusParagraphs.h index 9446d432c..3c5d35183 100644 --- a/toolsrc/include/StatusParagraphs.h +++ b/toolsrc/include/StatusParagraphs.h @@ -1,6 +1,7 @@ #pragma once #include "StatusParagraph.h" #include <memory> +#include <iterator> namespace vcpkg { @@ -13,30 +14,34 @@ namespace vcpkg using iterator = container::reverse_iterator; using const_iterator = container::const_reverse_iterator; + const_iterator find(const package_spec& spec) const + { + return find(spec.name(), spec.target_triplet()); + } 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>); friend std::ostream& operator<<(std::ostream&, const StatusParagraphs&); - auto end() + iterator end() { return paragraphs.rend(); } - auto end() const + const_iterator end() const { return paragraphs.rend(); } - auto begin() + iterator begin() { return paragraphs.rbegin(); } - auto begin() const + const_iterator begin() const { return paragraphs.rbegin(); } |
