clang-format all the things
MODIFY
include/vcpkg/base/work_queue.h
include/vcpkg/base/work_queue.h
@@ -98,7 +98,6 @@ namespace vcpkg
if (!running_workers())
{
m_cv.notify_one();
-
}
}

MODIFY
src/tests.files.cpp
src/tests.files.cpp
#include <vcpkg/base/files.h>
#include <vcpkg/base/strings.h>
-#include <iostream>
#include <filesystem> // required for filesystem::create_{directory_}symlink
+#include <iostream>
#include <random>
#include <windows.h>
@@ -105,13 +105,17 @@ namespace UnitTest1
// if we're at the max depth, we only want to build non-directories
std::uint64_t file_type;
- if (depth < max_depth) {
+ if (depth < max_depth)
+ {
file_type = uid{directory_min_tag, regular_symlink_tag}(urbg);
- } else {
+ }
+ else
+ {
file_type = uid{regular_file_tag, regular_symlink_tag}(urbg);
}
- if (!ALLOW_SYMLINKS && file_type > regular_file_tag) {
+ if (!ALLOW_SYMLINKS && file_type > regular_file_tag)
+ {
file_type = regular_file_tag;
}

MODIFY
src/tests.strings.cpp
src/tests.strings.cpp
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
-namespace UnitTest1 {
- class StringsTest : public TestClass<StringsTest> {
+namespace UnitTest1
+{
+ class StringsTest : public TestClass<StringsTest>
+ {
TEST_METHOD(b64url_encode)
{
using u64 = std::uint64_t;
@@ -29,7 +31,8 @@ namespace UnitTest1 {
map.emplace_back(0xFFFF'FFFF'FFFF'FFFF, "777777777777P");
std::string result;
- for (const auto& pr : map) {
+ for (const auto& pr : map)
+ {
result = vcpkg::Strings::b32_encode(pr.first);
Assert::AreEqual(result, pr.second);
}

MODIFY
src/vcpkg/base/strings.cpp
src/vcpkg/base/strings.cpp
@@ -301,7 +301,8 @@ namespace vcpkg::Strings
auto value = static_cast<Unsigned>(x);
// 32 values, plus the implicit \0
- constexpr static char map[33] = "ABCDEFGHIJKLMNOP" "QRSTUVWXYZ234567";
+ constexpr static char map[33] = "ABCDEFGHIJKLMNOP"
+ "QRSTUVWXYZ234567";
// log2(32)
constexpr static int shift = 5;

MODIFY
src/vcpkg/build.cpp
src/vcpkg/build.cpp
@@ -363,8 +363,7 @@ namespace vcpkg::Build
const Triplet& triplet = spec.triplet();
const auto& triplet_file_path = paths.get_triplet_file_path(spec.triplet()).u8string();
- if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path,
- paths.triplets.u8string()))
+ if (!Strings::case_insensitive_ascii_starts_with(triplet_file_path, paths.triplets.u8string()))
{
System::printf("-- Loading triplet configuration from: %s\n", triplet_file_path);
}
@@ -431,8 +430,7 @@ namespace vcpkg::Build
}
command.append(cmd_launch_cmake);
const auto timer = Chrono::ElapsedTimer::create_started();
- const int return_code = System::cmd_execute_clean(
- command,
+ const int return_code = System::cmd_execute_clean(command,
{}
#ifdef _WIN32
,
@@ -1020,8 +1018,7 @@ namespace vcpkg::Build
hash += "-";
hash += Hash::get_file_hash(fs, *p, "SHA1");
}
- else if (pre_build_info.cmake_system_name.empty() ||
- pre_build_info.cmake_system_name == "WindowsStore")
+ else if (pre_build_info.cmake_system_name.empty() || pre_build_info.cmake_system_name == "WindowsStore")
{
hash += "-";
hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "windows.cmake", "SHA1");

clang-format all the things