diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-07-06 16:45:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 16:45:34 -0700 |
| commit | 6a41626eaf33d2f3392e06d98a94c630bfc30977 (patch) | |
| tree | fb92f59f27b99c56ed48f6cae649468b4407a073 /toolsrc/include | |
| parent | ae4968fad40e8c14541dae89c481ec32c0500426 (diff) | |
| download | vcpkg-6a41626eaf33d2f3392e06d98a94c630bfc30977.tar.gz vcpkg-6a41626eaf33d2f3392e06d98a94c630bfc30977.zip | |
[vcpkg] Format the C++ in CI (#11655)
* [vcpkg] Format the C++ in the CI
* format the C++
* CR
Diffstat (limited to 'toolsrc/include')
52 files changed, 186 insertions, 187 deletions
diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 46ba6fa37..f92792411 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -1,8 +1,9 @@ #pragma once -#include <vcpkg/base/pragmas.h> #include <vcpkg/base/system_headers.h> +#include <vcpkg/base/pragmas.h> + #if defined(_WIN32) #include <process.h> #include <shellapi.h> @@ -49,9 +50,10 @@ #include <sys/time.h> #endif +#include <time.h> + #include <system_error> #include <thread> -#include <time.h> #include <type_traits> #include <unordered_map> #include <unordered_set> diff --git a/toolsrc/include/vcpkg-test/util.h b/toolsrc/include/vcpkg-test/util.h index 9321f3fd2..f7d2f2a50 100644 --- a/toolsrc/include/vcpkg-test/util.h +++ b/toolsrc/include/vcpkg-test/util.h @@ -1,13 +1,13 @@ #include <vcpkg/base/system_headers.h> #include <catch2/catch.hpp> -#include <vcpkg/base/pragmas.h> + +#include <memory> #include <vcpkg/base/files.h> +#include <vcpkg/base/pragmas.h> #include <vcpkg/statusparagraph.h> -#include <memory> - #define CHECK_EC(ec) \ do \ { \ @@ -54,7 +54,7 @@ namespace vcpkg::Test { std::unordered_map<std::string, SourceControlFileLocation> map; Triplet triplet; - PackageSpecMap(Triplet t = Triplet::X86_WINDOWS) noexcept : triplet(t) {} + PackageSpecMap(Triplet t = Triplet::X86_WINDOWS) noexcept : triplet(t) { } PackageSpec emplace(const char* name, const char* depends = "", @@ -86,9 +86,9 @@ namespace vcpkg::Test Yes = true, } tag; - constexpr AllowSymlinks(Tag tag) noexcept : tag(tag) {} + constexpr AllowSymlinks(Tag tag) noexcept : tag(tag) { } - constexpr explicit AllowSymlinks(bool b) noexcept : tag(b ? Yes : No) {} + constexpr explicit AllowSymlinks(bool b) noexcept : tag(b ? Yes : No) { } constexpr operator bool() const noexcept { return tag == Yes; } }; diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index 118e9c382..b2865476a 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -1,11 +1,11 @@ #pragma once -#include <vcpkg/base/cstringview.h> -#include <vcpkg/base/optional.h> - #include <chrono> #include <string> +#include <vcpkg/base/cstringview.h> +#include <vcpkg/base/optional.h> + namespace vcpkg::Chrono { class ElapsedTime @@ -13,8 +13,8 @@ namespace vcpkg::Chrono using duration = std::chrono::high_resolution_clock::time_point::duration; public: - constexpr ElapsedTime() noexcept : m_duration() {} - constexpr ElapsedTime(duration d) noexcept : m_duration(d) {} + constexpr ElapsedTime() noexcept : m_duration() { } + constexpr ElapsedTime(duration d) noexcept : m_duration(d) { } template<class TimeUnit> TimeUnit as() const @@ -34,7 +34,7 @@ namespace vcpkg::Chrono public: static ElapsedTimer create_started(); - constexpr ElapsedTimer() noexcept : m_start_tick() {} + constexpr ElapsedTimer() noexcept : m_start_tick() { } ElapsedTime elapsed() const { @@ -56,8 +56,8 @@ namespace vcpkg::Chrono static Optional<CTime> get_current_date_time(); static Optional<CTime> parse(CStringView str); - constexpr CTime() noexcept : m_tm{} {} - explicit constexpr CTime(tm t) noexcept : m_tm{t} {} + constexpr CTime() noexcept : m_tm{} { } + explicit constexpr CTime(tm t) noexcept : m_tm{t} { } CTime add_hours(const int hours) const; diff --git a/toolsrc/include/vcpkg/base/cofffilereader.h b/toolsrc/include/vcpkg/base/cofffilereader.h index e0ad69b33..a135ba028 100644 --- a/toolsrc/include/vcpkg/base/cofffilereader.h +++ b/toolsrc/include/vcpkg/base/cofffilereader.h @@ -1,10 +1,10 @@ #pragma once +#include <vector> + #include <vcpkg/base/files.h> #include <vcpkg/base/machinetype.h> -#include <vector> - namespace vcpkg::CoffFileReader { struct DllInfo diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index d49bfc82f..7d46ecf2e 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -7,10 +7,10 @@ namespace vcpkg { struct CStringView { - constexpr CStringView() noexcept : cstr(nullptr) {} - constexpr CStringView(const char* cstr) : cstr(cstr) {} + constexpr CStringView() noexcept : cstr(nullptr) { } + constexpr CStringView(const char* cstr) : cstr(cstr) { } constexpr CStringView(const CStringView&) = default; - CStringView(const std::string& str) : cstr(str.c_str()) {} + CStringView(const std::string& str) : cstr(str.c_str()) { } constexpr const char* c_str() const { return cstr; } diff --git a/toolsrc/include/vcpkg/base/enums.h b/toolsrc/include/vcpkg/base/enums.h index 6eca2cfe1..77ca7194f 100644 --- a/toolsrc/include/vcpkg/base/enums.h +++ b/toolsrc/include/vcpkg/base/enums.h @@ -1,9 +1,9 @@ #pragma once -#include <vcpkg/base/lineinfo.h> - #include <string> +#include <vcpkg/base/lineinfo.h> + namespace vcpkg::Enums { std::string nullvalue_to_string(const CStringView enum_name); diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index 40f5af40f..6381f1e89 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -1,16 +1,16 @@ #pragma once +#include <system_error> + #include <vcpkg/base/checks.h> #include <vcpkg/base/stringliteral.h> -#include <system_error> - namespace vcpkg { template<class Err> struct ErrorHolder { - ErrorHolder() : m_is_error(false), m_err{} {} + ErrorHolder() : m_is_error(false), m_err{} { } template<class U> ErrorHolder(U&& err) : m_is_error(true), m_err(std::forward<U>(err)) { diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h index f368a872d..957af0fba 100644 --- a/toolsrc/include/vcpkg/base/graphs.h +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -34,7 +34,7 @@ namespace vcpkg::Graphs virtual int random(int max_exclusive) = 0; protected: - ~Randomizer() {} + ~Randomizer() { } }; namespace details diff --git a/toolsrc/include/vcpkg/base/hash.h b/toolsrc/include/vcpkg/base/hash.h index d62fd3921..2878807d4 100644 --- a/toolsrc/include/vcpkg/base/hash.h +++ b/toolsrc/include/vcpkg/base/hash.h @@ -1,9 +1,9 @@ #pragma once -#include <vcpkg/base/files.h> - #include <string> +#include <vcpkg/base/files.h> + namespace vcpkg::Hash { enum class Algorithm diff --git a/toolsrc/include/vcpkg/base/json.h b/toolsrc/include/vcpkg/base/json.h index ecb96cde1..97c8be91f 100644 --- a/toolsrc/include/vcpkg/base/json.h +++ b/toolsrc/include/vcpkg/base/json.h @@ -1,17 +1,18 @@ #pragma once -#include <vcpkg/base/expected.h> -#include <vcpkg/base/files.h> -#include <vcpkg/base/parse.h> -#include <vcpkg/base/stringview.h> - #include <stddef.h> #include <stdint.h> + #include <memory> #include <string> #include <utility> #include <vector> +#include <vcpkg/base/expected.h> +#include <vcpkg/base/files.h> +#include <vcpkg/base/parse.h> +#include <vcpkg/base/stringview.h> + namespace vcpkg::Json { struct JsonStyle diff --git a/toolsrc/include/vcpkg/base/lazy.h b/toolsrc/include/vcpkg/base/lazy.h index 58c11c002..d0afdaeb2 100644 --- a/toolsrc/include/vcpkg/base/lazy.h +++ b/toolsrc/include/vcpkg/base/lazy.h @@ -6,7 +6,7 @@ namespace vcpkg class Lazy { public: - Lazy() : value(T()), initialized(false) {} + Lazy() : value(T()), initialized(false) { } template<class F> T const& get_lazy(const F& f) const diff --git a/toolsrc/include/vcpkg/base/lineinfo.h b/toolsrc/include/vcpkg/base/lineinfo.h index 2f03fef16..b90b6fac3 100644 --- a/toolsrc/include/vcpkg/base/lineinfo.h +++ b/toolsrc/include/vcpkg/base/lineinfo.h @@ -6,8 +6,8 @@ namespace vcpkg { struct LineInfo { - constexpr LineInfo() noexcept : m_line_number(0), m_file_name("") {} - constexpr LineInfo(const int lineno, const char* filename) : m_line_number(lineno), m_file_name(filename) {} + constexpr LineInfo() noexcept : m_line_number(0), m_file_name("") { } + constexpr LineInfo(const int lineno, const char* filename) : m_line_number(lineno), m_file_name(filename) { } std::string to_string() const; void to_string(std::string& out) const; diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index 0d77f4b03..842f72f95 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -1,17 +1,16 @@ #pragma once -#include <vcpkg/base/pragmas.h> - -#include <vcpkg/base/lineinfo.h> - #include <type_traits> #include <utility> +#include <vcpkg/base/lineinfo.h> +#include <vcpkg/base/pragmas.h> + namespace vcpkg { struct NullOpt { - explicit constexpr NullOpt(int) {} + explicit constexpr NullOpt(int) { } }; const static constexpr NullOpt nullopt{0}; @@ -22,9 +21,9 @@ namespace vcpkg struct OptionalStorage { VCPKG_MSVC_WARNING(suppress : 26495) - constexpr OptionalStorage() noexcept : m_is_present(false), m_inactive() {} - constexpr OptionalStorage(const T& t) : m_is_present(true), m_t(t) {} - constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) {} + constexpr OptionalStorage() noexcept : m_is_present(false), m_inactive() { } + constexpr OptionalStorage(const T& t) : m_is_present(true), m_t(t) { } + constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) { } ~OptionalStorage() noexcept { @@ -96,7 +95,8 @@ namespace vcpkg } bool m_is_present; - union { + union + { char m_inactive; T m_t; }; @@ -106,8 +106,8 @@ namespace vcpkg struct OptionalStorage<T, false> { VCPKG_MSVC_WARNING(suppress : 26495) - constexpr OptionalStorage() noexcept : m_is_present(false), m_inactive() {} - constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) {} + constexpr OptionalStorage() noexcept : m_is_present(false), m_inactive() { } + constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) { } ~OptionalStorage() noexcept { @@ -155,7 +155,8 @@ namespace vcpkg } bool m_is_present; - union { + union + { char m_inactive; T m_t; }; @@ -164,8 +165,8 @@ namespace vcpkg template<class T, bool B> struct OptionalStorage<T&, B> { - constexpr OptionalStorage() noexcept : m_t(nullptr) {} - constexpr OptionalStorage(T& t) : m_t(&t) {} + constexpr OptionalStorage() noexcept : m_t(nullptr) { } + constexpr OptionalStorage(T& t) : m_t(&t) { } constexpr bool has_value() const { return m_t != nullptr; } @@ -182,10 +183,10 @@ namespace vcpkg template<class T> struct Optional { - constexpr Optional() noexcept {} + constexpr Optional() noexcept { } // Constructors are intentionally implicit - constexpr Optional(NullOpt) {} + constexpr Optional(NullOpt) { } template<class U, class = std::enable_if_t<!std::is_same<std::decay_t<U>, Optional>::value>> constexpr Optional(U&& t) : m_base(std::forward<U>(t)) diff --git a/toolsrc/include/vcpkg/base/parse.h b/toolsrc/include/vcpkg/base/parse.h index c5044865e..d63cf1ced 100644 --- a/toolsrc/include/vcpkg/base/parse.h +++ b/toolsrc/include/vcpkg/base/parse.h @@ -1,14 +1,14 @@ #pragma once +#include <memory> +#include <string> + #include <vcpkg/base/cstringview.h> #include <vcpkg/base/optional.h> #include <vcpkg/base/stringview.h> #include <vcpkg/base/unicode.h> #include <vcpkg/textrowcol.h> -#include <memory> -#include <string> - namespace vcpkg::Parse { struct IParseError diff --git a/toolsrc/include/vcpkg/base/sortedvector.h b/toolsrc/include/vcpkg/base/sortedvector.h index fbb7e5a5a..33379676e 100644 --- a/toolsrc/include/vcpkg/base/sortedvector.h +++ b/toolsrc/include/vcpkg/base/sortedvector.h @@ -13,7 +13,7 @@ namespace vcpkg using size_type = typename std::vector<T>::size_type; using iterator = typename std::vector<T>::const_iterator; - SortedVector() : m_data() {} + SortedVector() : m_data() { } explicit SortedVector(std::vector<T> v) : m_data(std::move(v)) { diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h index a5ba884af..482fe1b00 100644 --- a/toolsrc/include/vcpkg/base/span.h +++ b/toolsrc/include/vcpkg/base/span.h @@ -19,10 +19,10 @@ namespace vcpkg using reference = std::add_lvalue_reference_t<T>;
using iterator = pointer;
- constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {}
- constexpr Span(std::nullptr_t) noexcept : m_ptr(nullptr), m_count(0) {}
- constexpr Span(pointer ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
- constexpr Span(pointer ptr_begin, pointer ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
+ constexpr Span() noexcept : m_ptr(nullptr), m_count(0) { }
+ constexpr Span(std::nullptr_t) noexcept : m_ptr(nullptr), m_count(0) { }
+ constexpr Span(pointer ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) { }
+ constexpr Span(pointer ptr_begin, pointer ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) { }
template<size_t N>
constexpr Span(T (&arr)[N]) noexcept : m_ptr(arr), m_count(N)
diff --git a/toolsrc/include/vcpkg/base/stringliteral.h b/toolsrc/include/vcpkg/base/stringliteral.h index 602e0bfd2..d0d5dc124 100644 --- a/toolsrc/include/vcpkg/base/stringliteral.h +++ b/toolsrc/include/vcpkg/base/stringliteral.h @@ -1,6 +1,7 @@ #pragma once #include <string> + #include <vcpkg/base/zstringview.h> namespace vcpkg diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index e88d1074f..229bedb65 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -1,19 +1,18 @@ #pragma once -#include <vcpkg/base/pragmas.h> +#include <errno.h> +#include <inttypes.h> +#include <limits.h> + +#include <vector> #include <vcpkg/base/cstringview.h> #include <vcpkg/base/optional.h> +#include <vcpkg/base/pragmas.h> #include <vcpkg/base/stringliteral.h> #include <vcpkg/base/stringview.h> #include <vcpkg/base/view.h> -#include <errno.h> -#include <inttypes.h> -#include <limits.h> - -#include <vector> - namespace vcpkg::Strings::details { template<class T> diff --git a/toolsrc/include/vcpkg/base/stringview.h b/toolsrc/include/vcpkg/base/stringview.h index 6a5503e1c..a442964f8 100644 --- a/toolsrc/include/vcpkg/base/stringview.h +++ b/toolsrc/include/vcpkg/base/stringview.h @@ -1,11 +1,11 @@ #pragma once -#include <vcpkg/base/optional.h> - #include <limits> #include <string> #include <vector> +#include <vcpkg/base/optional.h> + namespace vcpkg { struct StringView diff --git a/toolsrc/include/vcpkg/base/system.debug.h b/toolsrc/include/vcpkg/base/system.debug.h index d9c50ac8e..c1f98a9e1 100644 --- a/toolsrc/include/vcpkg/base/system.debug.h +++ b/toolsrc/include/vcpkg/base/system.debug.h @@ -1,10 +1,10 @@ #pragma once +#include <atomic> + #include <vcpkg/base/chrono.h> #include <vcpkg/base/system.print.h> -#include <atomic> - namespace vcpkg::Debug { extern std::atomic<bool> g_debugging; diff --git a/toolsrc/include/vcpkg/base/system.process.h b/toolsrc/include/vcpkg/base/system.process.h index 91faa5985..9dbb5d069 100644 --- a/toolsrc/include/vcpkg/base/system.process.h +++ b/toolsrc/include/vcpkg/base/system.process.h @@ -1,13 +1,13 @@ #pragma once -#include <vcpkg/base/files.h> -#include <vcpkg/base/zstringview.h> - #include <functional> #include <string> #include <unordered_map> #include <vector> +#include <vcpkg/base/files.h> +#include <vcpkg/base/zstringview.h> + namespace vcpkg::System { struct CMakeVariable diff --git a/toolsrc/include/vcpkg/base/system_headers.h b/toolsrc/include/vcpkg/base/system_headers.h index 9af5bfd92..858cf58cc 100644 --- a/toolsrc/include/vcpkg/base/system_headers.h +++ b/toolsrc/include/vcpkg/base/system_headers.h @@ -17,7 +17,8 @@ // ctermid is not behind an `extern "C"` barrier, so it's linked incorrectly. // This has been reported; remove it after 2023-05-19 #if __APPLE__ -extern "C" { +extern "C" +{ #endif #include <unistd.h> @@ -32,4 +33,3 @@ extern "C" { // glibc defines major and minor in sys/types.h, and should not #undef major #undef minor - diff --git a/toolsrc/include/vcpkg/base/uint128.h b/toolsrc/include/vcpkg/base/uint128.h index 6b7816760..feac68bb7 100644 --- a/toolsrc/include/vcpkg/base/uint128.h +++ b/toolsrc/include/vcpkg/base/uint128.h @@ -2,25 +2,23 @@ #include <stdint.h> -namespace vcpkg { +namespace vcpkg +{ + struct UInt128 + { + UInt128() = default; + UInt128(uint64_t value) : bottom(value), top(0) { } -struct UInt128 { - UInt128() = default; - UInt128(uint64_t value) : bottom(value), top(0) {} + UInt128& operator<<=(int by) noexcept; + UInt128& operator>>=(int by) noexcept; + UInt128& operator+=(uint64_t lhs) noexcept; - UInt128& operator<<=(int by) noexcept; - UInt128& operator>>=(int by) noexcept; - UInt128& operator+=(uint64_t lhs) noexcept; + uint64_t bottom_64_bits() const noexcept { return bottom; } + uint64_t top_64_bits() const noexcept { return top; } - uint64_t bottom_64_bits() const noexcept { - return bottom; - } - uint64_t top_64_bits() const noexcept { - return top; - } -private: - uint64_t bottom; - uint64_t top; -}; + private: + uint64_t bottom; + uint64_t top; + }; } diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index a5b56028b..a6d8781b0 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -218,7 +218,7 @@ namespace vcpkg::Util T* get() { return &m_ptr; } - LockGuardPtr(LockGuarded<T>& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) {} + LockGuardPtr(LockGuarded<T>& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) { } private: std::unique_lock<std::mutex> m_lock; diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index a60613a3c..ba622361a 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -1,17 +1,17 @@ #pragma once -#include <vcpkg/base/checks.h> - #include <condition_variable> #include <memory> #include <vector> +#include <vcpkg/base/checks.h> + namespace vcpkg { template<class Action> struct WorkQueue { - WorkQueue(LineInfo li) : m_line_info(li) {} + WorkQueue(LineInfo li) : m_line_info(li) { } WorkQueue(const WorkQueue&) = delete; ~WorkQueue() diff --git a/toolsrc/include/vcpkg/base/zstringview.h b/toolsrc/include/vcpkg/base/zstringview.h index 7f80bf726..8aa0dbdaf 100644 --- a/toolsrc/include/vcpkg/base/zstringview.h +++ b/toolsrc/include/vcpkg/base/zstringview.h @@ -14,7 +14,7 @@ namespace vcpkg { using value_type = char; - constexpr ZStringView() : m_size(0), m_cstr("") {} + constexpr ZStringView() : m_size(0), m_cstr("") { } template<int N> constexpr ZStringView(const char (&str)[N]) @@ -22,8 +22,8 @@ namespace vcpkg { } - ZStringView(const std::string& s) : m_size(s.size()), m_cstr(s.c_str()) {} - constexpr ZStringView(const char* str, size_t sz) : m_size(sz), m_cstr(str) {} + ZStringView(const std::string& s) : m_size(s.size()), m_cstr(s.c_str()) { } + constexpr ZStringView(const char* str, size_t sz) : m_size(sz), m_cstr(str) { } constexpr const char* data() const { return m_cstr; } constexpr size_t size() const { return m_size; } diff --git a/toolsrc/include/vcpkg/binarycaching.private.h b/toolsrc/include/vcpkg/binarycaching.private.h index f20a0db12..6f2fda9c0 100644 --- a/toolsrc/include/vcpkg/binarycaching.private.h +++ b/toolsrc/include/vcpkg/binarycaching.private.h @@ -1,6 +1,7 @@ #pragma once
#include <string>
+
#include <vcpkg/dependencies.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/vcpkgpaths.h>
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index ea9f86fef..9d4e17eae 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -1,5 +1,14 @@ #pragma once +#include <array> +#include <map> +#include <set> +#include <vector> + +#include <vcpkg/base/cstringview.h> +#include <vcpkg/base/files.h> +#include <vcpkg/base/optional.h> +#include <vcpkg/base/system.process.h> #include <vcpkg/cmakevars.h> #include <vcpkg/packagespec.h> #include <vcpkg/statusparagraphs.h> @@ -7,16 +16,6 @@ #include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkgpaths.h> -#include <vcpkg/base/cstringview.h> -#include <vcpkg/base/files.h> -#include <vcpkg/base/optional.h> -#include <vcpkg/base/system.process.h> - -#include <array> -#include <map> -#include <set> -#include <vector> - namespace vcpkg { struct IBinaryProvider; diff --git a/toolsrc/include/vcpkg/buildenvironment.h b/toolsrc/include/vcpkg/buildenvironment.h index 4505f4972..fe5bbeaf7 100644 --- a/toolsrc/include/vcpkg/buildenvironment.h +++ b/toolsrc/include/vcpkg/buildenvironment.h @@ -1,9 +1,9 @@ -#include <vcpkg/base/system.process.h>
-#include <vcpkg/vcpkgpaths.h>
-
#include <string>
#include <vector>
+#include <vcpkg/base/system.process.h>
+#include <vcpkg/vcpkgpaths.h>
+
namespace vcpkg
{
std::string make_cmake_cmd(const VcpkgPaths& paths,
diff --git a/toolsrc/include/vcpkg/cmakevars.h b/toolsrc/include/vcpkg/cmakevars.h index 1c02376b9..e2f1df522 100644 --- a/toolsrc/include/vcpkg/cmakevars.h +++ b/toolsrc/include/vcpkg/cmakevars.h @@ -1,7 +1,6 @@ #pragma once #include <vcpkg/base/optional.h> - #include <vcpkg/portfileprovider.h> #include <vcpkg/vcpkgpaths.h> diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index cec9237f5..2a8d88320 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -1,15 +1,15 @@ #pragma once +#include <array> +#include <map> +#include <vector> + #include <vcpkg/build.h> #include <vcpkg/dependencies.h> #include <vcpkg/statusparagraphs.h> #include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkgpaths.h> -#include <array> -#include <map> -#include <vector> - namespace vcpkg::Commands { using CommandTypeA = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 5e1c9f657..9e11d1c41 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -1,5 +1,9 @@ #pragma once +#include <functional> +#include <map> +#include <vector> + #include <vcpkg/base/optional.h> #include <vcpkg/base/util.h> #include <vcpkg/build.h> @@ -9,10 +13,6 @@ #include <vcpkg/statusparagraphs.h> #include <vcpkg/vcpkgpaths.h> -#include <functional> -#include <map> -#include <vector> - namespace vcpkg::Graphs { struct Randomizer; diff --git a/toolsrc/include/vcpkg/export.chocolatey.h b/toolsrc/include/vcpkg/export.chocolatey.h index 7804108fd..a6dde36db 100644 --- a/toolsrc/include/vcpkg/export.chocolatey.h +++ b/toolsrc/include/vcpkg/export.chocolatey.h @@ -1,10 +1,10 @@ #pragma once
+#include <vector>
+
#include <vcpkg/dependencies.h>
#include <vcpkg/vcpkgpaths.h>
-#include <vector>
-
namespace vcpkg::Export::Chocolatey
{
struct Options
diff --git a/toolsrc/include/vcpkg/export.ifw.h b/toolsrc/include/vcpkg/export.ifw.h index b1573924e..ec01511aa 100644 --- a/toolsrc/include/vcpkg/export.ifw.h +++ b/toolsrc/include/vcpkg/export.ifw.h @@ -1,11 +1,11 @@ #pragma once -#include <vcpkg/dependencies.h> -#include <vcpkg/vcpkgpaths.h> - #include <string> #include <vector> +#include <vcpkg/dependencies.h> +#include <vcpkg/vcpkgpaths.h> + namespace vcpkg::Export::IFW { struct Options diff --git a/toolsrc/include/vcpkg/export.prefab.h b/toolsrc/include/vcpkg/export.prefab.h index cf9f940f9..cfd99bec7 100644 --- a/toolsrc/include/vcpkg/export.prefab.h +++ b/toolsrc/include/vcpkg/export.prefab.h @@ -1,12 +1,11 @@ #pragma once +#include <vector> + #include <vcpkg/base/system.h> #include <vcpkg/dependencies.h> #include <vcpkg/vcpkgpaths.h> - -#include <vector> - namespace vcpkg::Export::Prefab { constexpr int kFragmentSize = 3; @@ -23,17 +22,14 @@ namespace vcpkg::Export::Prefab }; struct NdkVersion { - NdkVersion(int _major, int _minor, int _patch) : m_major{_major}, - m_minor{_minor}, - m_patch{_patch}{ - } - int major() { return this->m_major; } - int minor() { return this->m_minor; } - int patch() { return this->m_patch; } + NdkVersion(int _major, int _minor, int _patch) : m_major{_major}, m_minor{_minor}, m_patch{_patch} { } + int major() { return this->m_major; } + int minor() { return this->m_minor; } + int patch() { return this->m_patch; } std::string to_string(); void to_string(std::string& out); - private: + private: int m_major; int m_minor; int m_patch; @@ -72,11 +68,10 @@ namespace vcpkg::Export::Prefab std::string to_json(); }; - - void do_export(const std::vector<Dependencies::ExportPlanAction>& export_plan, const VcpkgPaths& paths, - const Options& prefab_options, const Triplet& triplet); - Optional<std::string> find_ndk_version(const std::string &content); - Optional<NdkVersion> to_version(const std::string &version); + const Options& prefab_options, + const Triplet& triplet); + Optional<std::string> find_ndk_version(const std::string& content); + Optional<NdkVersion> to_version(const std::string& version); } diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h index 35ca71dbb..a5bc46ec5 100644 --- a/toolsrc/include/vcpkg/globalstate.h +++ b/toolsrc/include/vcpkg/globalstate.h @@ -1,11 +1,11 @@ #pragma once -#include <vcpkg/base/chrono.h> -#include <vcpkg/base/util.h> - #include <atomic> #include <string> +#include <vcpkg/base/chrono.h> +#include <vcpkg/base/util.h> + namespace vcpkg { struct GlobalState diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h index 97bc11864..bebf91c64 100644 --- a/toolsrc/include/vcpkg/help.h +++ b/toolsrc/include/vcpkg/help.h @@ -1,10 +1,10 @@ #pragma once +#include <string> + #include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkgpaths.h> -#include <string> - namespace vcpkg::Help { extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 2700ac3a8..81beb8a15 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -1,13 +1,13 @@ #pragma once +#include <vector> + #include <vcpkg/base/chrono.h> #include <vcpkg/build.h> #include <vcpkg/dependencies.h> #include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkgpaths.h> -#include <vector> - namespace vcpkg::Install { enum class KeepGoing diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index 89fb8a92f..67fbfc00f 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -1,10 +1,10 @@ #pragma once -#include <vcpkg/base/util.h> -#include <vcpkg/base/files.h> - #include <string> +#include <vcpkg/base/files.h> +#include <vcpkg/base/util.h> + namespace vcpkg::Metrics { struct Metrics : Util::ResourceBase diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index ae771f20c..014c1318d 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -21,7 +21,7 @@ namespace vcpkg struct PackageSpec { PackageSpec() = default; - PackageSpec(std::string name, Triplet triplet) : m_name(std::move(name)), m_triplet(triplet) {} + PackageSpec(std::string name, Triplet triplet) : m_name(std::move(name)), m_triplet(triplet) { } static std::vector<PackageSpec> to_package_specs(const std::vector<std::string>& ports, Triplet triplet); @@ -54,7 +54,7 @@ namespace vcpkg /// struct FeatureSpec { - FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {} + FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) { } const std::string& name() const { return m_spec.name(); } const std::string& feature() const { return m_feature; } diff --git a/toolsrc/include/vcpkg/paragraphparser.h b/toolsrc/include/vcpkg/paragraphparser.h index 71d11ddd0..1f48a720f 100644 --- a/toolsrc/include/vcpkg/paragraphparser.h +++ b/toolsrc/include/vcpkg/paragraphparser.h @@ -1,15 +1,15 @@ #pragma once -#include <vcpkg/base/expected.h> -#include <vcpkg/packagespec.h> -#include <vcpkg/textrowcol.h> - #include <map> #include <memory> #include <string> #include <unordered_map> #include <vector> +#include <vcpkg/base/expected.h> +#include <vcpkg/packagespec.h> +#include <vcpkg/textrowcol.h> + namespace vcpkg::Parse { struct ParseControlErrorInfo diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index 8f1c09c5b..67077f6c2 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -1,11 +1,10 @@ #pragma once +#include <vcpkg/base/expected.h> #include <vcpkg/binaryparagraph.h> #include <vcpkg/paragraphparser.h> #include <vcpkg/vcpkgpaths.h> -#include <vcpkg/base/expected.h> - namespace vcpkg::Paragraphs { using Paragraph = Parse::Paragraph; @@ -17,7 +16,10 @@ namespace vcpkg::Paragraphs bool is_port_directory(const Files::Filesystem& fs, const fs::path& path); - Parse::ParseExpected<SourceControlFile> try_load_manifest(const Files::Filesystem& fs, const std::string& port_name, const fs::path& path_to_manifest, std::error_code& ec); + Parse::ParseExpected<SourceControlFile> try_load_manifest(const Files::Filesystem& fs, + const std::string& port_name, + const fs::path& path_to_manifest, + std::error_code& ec); Parse::ParseExpected<SourceControlFile> try_load_port(const Files::Filesystem& fs, const fs::path& path); diff --git a/toolsrc/include/vcpkg/platform-expression.h b/toolsrc/include/vcpkg/platform-expression.h index d857d75dc..8beb5d1d9 100644 --- a/toolsrc/include/vcpkg/platform-expression.h +++ b/toolsrc/include/vcpkg/platform-expression.h @@ -2,6 +2,7 @@ #include <string>
#include <unordered_map>
+
#include <vcpkg/base/expected.h>
#include <vcpkg/base/stringview.h>
diff --git a/toolsrc/include/vcpkg/postbuildlint.buildtype.h b/toolsrc/include/vcpkg/postbuildlint.buildtype.h index 0b469d9a0..c99fe6084 100644 --- a/toolsrc/include/vcpkg/postbuildlint.buildtype.h +++ b/toolsrc/include/vcpkg/postbuildlint.buildtype.h @@ -1,11 +1,11 @@ #pragma once -#include <vcpkg/base/cstringview.h> -#include <vcpkg/build.h> - #include <array> #include <regex> +#include <vcpkg/base/cstringview.h> +#include <vcpkg/build.h> + namespace vcpkg::PostBuildLint { struct BuildType diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 4212258ab..00b847e64 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -5,9 +5,9 @@ #include <vcpkg/base/span.h> #include <vcpkg/base/system.h> #include <vcpkg/base/system.print.h> -#include <vcpkg/platform-expression.h> #include <vcpkg/packagespec.h> #include <vcpkg/paragraphparser.h> +#include <vcpkg/platform-expression.h> namespace vcpkg { diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h index fdcb5337d..5228e2964 100644 --- a/toolsrc/include/vcpkg/statusparagraph.h +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -1,9 +1,9 @@ #pragma once -#include <vcpkg/binaryparagraph.h> - #include <map> +#include <vcpkg/binaryparagraph.h> + namespace vcpkg { enum class InstallState @@ -47,7 +47,7 @@ namespace vcpkg struct InstalledPackageView { - InstalledPackageView() noexcept : core(nullptr) {} + InstalledPackageView() noexcept : core(nullptr) { } InstalledPackageView(const StatusParagraph* c, std::vector<const StatusParagraph*>&& fs) : core(c), features(std::move(fs)) diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index 8fd85b4e0..bebb4a3e0 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -1,9 +1,9 @@ #pragma once -#include <vcpkg/statusparagraph.h> - #include <iterator> #include <memory> +#include <vcpkg/statusparagraph.h> + namespace vcpkg { /// <summary>Status paragraphs</summary> diff --git a/toolsrc/include/vcpkg/tools.h b/toolsrc/include/vcpkg/tools.h index 6a096c321..7c5ad0480 100644 --- a/toolsrc/include/vcpkg/tools.h +++ b/toolsrc/include/vcpkg/tools.h @@ -1,17 +1,17 @@ #pragma once -#include <vcpkg/base/files.h> - #include <string> #include <utility> +#include <vcpkg/base/files.h> + namespace vcpkg { struct VcpkgPaths; struct ToolCache { - virtual ~ToolCache() {} + virtual ~ToolCache() { } virtual const fs::path& get_tool_path(const VcpkgPaths& paths, const std::string& tool) const = 0; virtual const std::string& get_tool_version(const VcpkgPaths& paths, const std::string& tool) const = 0; diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 4a88f5708..d23887b47 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -1,9 +1,9 @@ #pragma once #include <string> -#include <vcpkg/base/system.h> -#include <vcpkg/base/optional.h> +#include <vcpkg/base/optional.h> +#include <vcpkg/base/system.h> #include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg diff --git a/toolsrc/include/vcpkg/userconfig.h b/toolsrc/include/vcpkg/userconfig.h index d044f43ef..4a93472e2 100644 --- a/toolsrc/include/vcpkg/userconfig.h +++ b/toolsrc/include/vcpkg/userconfig.h @@ -1,6 +1,7 @@ #pragma once #include <string> + #include <vcpkg/base/files.h> namespace vcpkg diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index d8dc94a37..0ab5917b5 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -1,15 +1,15 @@ #pragma once -#include <vcpkg/base/optional.h> -#include <vcpkg/base/span.h> -#include <vcpkg/base/stringliteral.h> -#include <vcpkg/base/files.h> - #include <memory> #include <unordered_map> #include <unordered_set> #include <vector> +#include <vcpkg/base/files.h> +#include <vcpkg/base/optional.h> +#include <vcpkg/base/span.h> +#include <vcpkg/base/stringliteral.h> + namespace vcpkg { struct ParsedArguments diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 296b6a314..ba7b01e0e 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -1,15 +1,14 @@ #pragma once -#include <vcpkg/binaryparagraph.h> -#include <vcpkg/packagespec.h> -#include <vcpkg/tools.h> -#include <vcpkg/vcpkgcmdarguments.h> - #include <vcpkg/base/cache.h> #include <vcpkg/base/files.h> #include <vcpkg/base/lazy.h> #include <vcpkg/base/optional.h> #include <vcpkg/base/util.h> +#include <vcpkg/binaryparagraph.h> +#include <vcpkg/packagespec.h> +#include <vcpkg/tools.h> +#include <vcpkg/vcpkgcmdarguments.h> namespace vcpkg { |
