diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-27 17:56:06 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-27 18:59:57 -0700 |
| commit | 75e8752cb90eb8bc7717518d9d6a5c68f27f2b0f (patch) | |
| tree | b3a8c01beebba2b7e5524363b59bfc088aab83a2 /toolsrc/include/SortedVector.h | |
| parent | db2bc7ed80cd85935bcf80a02a06c796d01197b7 (diff) | |
| download | vcpkg-75e8752cb90eb8bc7717518d9d6a5c68f27f2b0f.tar.gz vcpkg-75e8752cb90eb8bc7717518d9d6a5c68f27f2b0f.zip | |
Run clang-format over the headers. Remove stray Version.h/cpp. Fix location of VersionT.cpp
Diffstat (limited to 'toolsrc/include/SortedVector.h')
| -rw-r--r-- | toolsrc/include/SortedVector.h | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/toolsrc/include/SortedVector.h b/toolsrc/include/SortedVector.h index 2dce8eb3b..62808cc2f 100644 --- a/toolsrc/include/SortedVector.h +++ b/toolsrc/include/SortedVector.h @@ -1,12 +1,12 @@ #pragma once -#include <vector> #include <algorithm> +#include <vector> // Add more forwarding functions to the m_data std::vector as needed. namespace vcpkg { - template <class T> + template<class T> class SortedVector { public: @@ -23,7 +23,7 @@ namespace vcpkg } } - template <class Compare> + template<class Compare> SortedVector(std::vector<T> v, Compare comp) : m_data(std::move(v)) { if (!std::is_sorted(m_data.cbegin(), m_data.cend(), comp)) @@ -32,35 +32,17 @@ namespace vcpkg } } - iterator begin() const - { - return this->m_data.cbegin(); - } + iterator begin() const { return this->m_data.cbegin(); } - iterator end() const - { - return this->m_data.cend(); - } + iterator end() const { return this->m_data.cend(); } - iterator cbegin() const - { - return this->m_data.cbegin(); - } + iterator cbegin() const { return this->m_data.cbegin(); } - iterator cend() const - { - return this->m_data.cend(); - } + iterator cend() const { return this->m_data.cend(); } - bool empty() const - { - return this->m_data.empty(); - } + bool empty() const { return this->m_data.empty(); } - size_type size() const - { - return this->m_data.size(); - } + size_type size() const { return this->m_data.size(); } private: std::vector<T> m_data; |
