diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-28 12:55:50 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-28 12:55:50 -0700 |
| commit | 346aa3fab8c02fcabe09b2738a392e62e792b99f (patch) | |
| tree | 2446160b304c81759439ec9e5fd952edae51005f | |
| parent | 8a1e0b144c26dd7e6e29a9b230936169ca595fed (diff) | |
| download | vcpkg-346aa3fab8c02fcabe09b2738a392e62e792b99f.tar.gz vcpkg-346aa3fab8c02fcabe09b2738a392e62e792b99f.zip | |
[clang-format] Cpp11BracedListStyle: true
27 files changed, 164 insertions, 175 deletions
diff --git a/toolsrc/.clang-format b/toolsrc/.clang-format index a4d57e4d8..b3a537545 100644 --- a/toolsrc/.clang-format +++ b/toolsrc/.clang-format @@ -23,7 +23,7 @@ BinPackParameters: false BreakBeforeBinaryOperators: None BreakConstructorInitializersBeforeComma: true ConstructorInitializerAllOnOneLineOrOnePerLine: true -Cpp11BracedListStyle: false +Cpp11BracedListStyle: true IndentCaseLabels: true KeepEmptyLinesAtTheStartOfBlocks: false NamespaceIndentation: All diff --git a/toolsrc/include/PostBuildLint_BuildPolicies.h b/toolsrc/include/PostBuildLint_BuildPolicies.h index 32f585ef0..11fb2e1d4 100644 --- a/toolsrc/include/PostBuildLint_BuildPolicies.h +++ b/toolsrc/include/PostBuildLint_BuildPolicies.h @@ -39,7 +39,6 @@ namespace vcpkg::PostBuildLint static constexpr BuildPolicies EMPTY_INCLUDE_FOLDER(BuildPolicies::BackingEnum::EMPTY_INCLUDE_FOLDER); static constexpr std::array<BuildPolicies, 4> VALUES = { - EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER - }; + EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER}; } } diff --git a/toolsrc/include/PostBuildLint_BuildType.h b/toolsrc/include/PostBuildLint_BuildType.h index a1da7729c..3cd67d347 100644 --- a/toolsrc/include/PostBuildLint_BuildType.h +++ b/toolsrc/include/PostBuildLint_BuildType.h @@ -46,13 +46,12 @@ namespace vcpkg::PostBuildLint static constexpr const char* ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; - static constexpr BuildType DEBUG_STATIC = { BE::DEBUG_STATIC, CC::DEBUG, LC::STATIC }; - static constexpr BuildType DEBUG_DYNAMIC = { BE::DEBUG_DYNAMIC, CC::DEBUG, LC::DYNAMIC }; - static constexpr BuildType RELEASE_STATIC = { BE::RELEASE_STATIC, CC::RELEASE, LC::STATIC }; - static constexpr BuildType RELEASE_DYNAMIC = { BE::RELEASE_DYNAMIC, CC::RELEASE, LC::DYNAMIC }; + static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, CC::DEBUG, LC::STATIC}; + static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, CC::DEBUG, LC::DYNAMIC}; + static constexpr BuildType RELEASE_STATIC = {BE::RELEASE_STATIC, CC::RELEASE, LC::STATIC}; + static constexpr BuildType RELEASE_DYNAMIC = {BE::RELEASE_DYNAMIC, CC::RELEASE, LC::DYNAMIC}; static constexpr std::array<BuildType, 4> VALUES = { - DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC - }; + DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; } } diff --git a/toolsrc/include/PostBuildLint_ConfigurationType.h b/toolsrc/include/PostBuildLint_ConfigurationType.h index 60f759813..61f56c0d5 100644 --- a/toolsrc/include/PostBuildLint_ConfigurationType.h +++ b/toolsrc/include/PostBuildLint_ConfigurationType.h @@ -31,6 +31,6 @@ namespace vcpkg::PostBuildLint static constexpr ConfigurationType DEBUG(ConfigurationType::BackingEnum::DEBUG); static constexpr ConfigurationType RELEASE(ConfigurationType::BackingEnum::RELEASE); - static constexpr std::array<ConfigurationType, 2> VALUES = { DEBUG, RELEASE }; + static constexpr std::array<ConfigurationType, 2> VALUES = {DEBUG, RELEASE}; } } diff --git a/toolsrc/include/PostBuildLint_LinkageType.h b/toolsrc/include/PostBuildLint_LinkageType.h index fe9b502ef..8c4d16b7e 100644 --- a/toolsrc/include/PostBuildLint_LinkageType.h +++ b/toolsrc/include/PostBuildLint_LinkageType.h @@ -32,6 +32,6 @@ namespace vcpkg::PostBuildLint static constexpr LinkageType DYNAMIC(LinkageType::BackingEnum::DYNAMIC); static constexpr LinkageType STATIC(LinkageType::BackingEnum::STATIC); - static constexpr std::array<LinkageType, 2> VALUES = { DYNAMIC, STATIC }; + static constexpr std::array<LinkageType, 2> VALUES = {DYNAMIC, STATIC}; } } diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 5807e45aa..6099918ce 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -29,8 +29,7 @@ namespace vcpkg::Commands BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, BuildResult::POST_BUILD_CHECKS_FAILED, - BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES - }; + BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES}; const std::string& to_string(const BuildResult build_result); std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); diff --git a/toolsrc/include/vcpkg_optional.h b/toolsrc/include/vcpkg_optional.h index 3b94d5a5d..b5a3268f0 100644 --- a/toolsrc/include/vcpkg_optional.h +++ b/toolsrc/include/vcpkg_optional.h @@ -8,7 +8,7 @@ namespace vcpkg explicit constexpr NullOpt(int) {} }; - const static constexpr NullOpt nullopt{ 0 }; + const static constexpr NullOpt nullopt{0}; template<class T> class Optional diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 5e3d4129f..5d7d7b441 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -36,24 +36,24 @@ namespace vcpkg::PostBuildLint const std::vector<OutdatedDynamicCrt>& get_outdated_dynamic_crts() { - static const std::vector<OutdatedDynamicCrt> v = { { "msvcp100.dll", R"(msvcp100\.dll)" }, - { "msvcp100d.dll", R"(msvcp100d\.dll)" }, - { "msvcp110.dll", R"(msvcp110\.dll)" }, - { "msvcp110_win.dll", R"(msvcp110_win\.dll)" }, - { "msvcp120.dll", R"(msvcp120\.dll)" }, - { "msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)" }, - { "msvcp60.dll", R"(msvcp60\.dll)" }, - { "msvcp60.dll", R"(msvcp60\.dll)" }, - - { "msvcr100.dll", R"(msvcr100\.dll)" }, - { "msvcr100d.dll", R"(msvcr100d\.dll)" }, - { "msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)" }, - { "msvcr110.dll", R"(msvcr110\.dll)" }, - { "msvcr120.dll", R"(msvcr120\.dll)" }, - { "msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)" }, - { "msvcrt.dll", R"(msvcrt\.dll)" }, - { "msvcrt20.dll", R"(msvcrt20\.dll)" }, - { "msvcrt40.dll", R"(msvcrt40\.dll)" } }; + static const std::vector<OutdatedDynamicCrt> v = {{"msvcp100.dll", R"(msvcp100\.dll)"}, + {"msvcp100d.dll", R"(msvcp100d\.dll)"}, + {"msvcp110.dll", R"(msvcp110\.dll)"}, + {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, + {"msvcp120.dll", R"(msvcp120\.dll)"}, + {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + + {"msvcr100.dll", R"(msvcr100\.dll)"}, + {"msvcr100d.dll", R"(msvcr100d\.dll)"}, + {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, + {"msvcr110.dll", R"(msvcr110\.dll)"}, + {"msvcr120.dll", R"(msvcr120\.dll)"}, + {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, + {"msvcrt.dll", R"(msvcrt\.dll)"}, + {"msvcrt20.dll", R"(msvcrt20\.dll)"}, + {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; return v; } @@ -402,7 +402,7 @@ namespace vcpkg::PostBuildLint if (expected_architecture != actual_architecture) { - binaries_with_invalid_architecture.push_back({ file, actual_architecture }); + binaries_with_invalid_architecture.push_back({file, actual_architecture}); } } @@ -435,7 +435,7 @@ namespace vcpkg::PostBuildLint const std::string actual_architecture = get_actual_architecture(info.machine_types.at(0)); if (expected_architecture != actual_architecture) { - binaries_with_invalid_architecture.push_back({ file, actual_architecture }); + binaries_with_invalid_architecture.push_back({file, actual_architecture}); } } @@ -618,7 +618,7 @@ namespace vcpkg::PostBuildLint { if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), bad_build_type.crt_regex())) { - libs_with_invalid_crt.push_back({ lib, bad_build_type }); + libs_with_invalid_crt.push_back({lib, bad_build_type}); break; } } @@ -672,7 +672,7 @@ namespace vcpkg::PostBuildLint { if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex)) { - dlls_with_outdated_crt.push_back({ dll, outdated_crt }); + dlls_with_outdated_crt.push_back({dll, outdated_crt}); break; } } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index ac88e54ac..d140ce72b 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -25,12 +25,12 @@ namespace vcpkg static const std::vector<std::string>& get_list_of_valid_fields() { - static const std::vector<std::string> valid_fields = { SourceParagraphRequiredField::SOURCE, - SourceParagraphRequiredField::VERSION, + static const std::vector<std::string> valid_fields = {SourceParagraphRequiredField::SOURCE, + SourceParagraphRequiredField::VERSION, - SourceParagraphOptionalField::DESCRIPTION, - SourceParagraphOptionalField::MAINTAINER, - SourceParagraphOptionalField::BUILD_DEPENDS }; + SourceParagraphOptionalField::DESCRIPTION, + SourceParagraphOptionalField::MAINTAINER, + SourceParagraphOptionalField::BUILD_DEPENDS}; return valid_fields; } @@ -67,14 +67,14 @@ namespace vcpkg { auto convert = [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return { depend_string, "" }; + if (pos == std::string::npos) return {depend_string, ""}; // expect of the form "\w+ \[\w+\]" Dependency dep; dep.name = depend_string.substr(0, pos); if (depend_string.c_str()[pos + 1] != '[' || depend_string[depend_string.size() - 1] != ']') { // Error, but for now just slurp the entire string. - return { depend_string, "" }; + return {depend_string, ""}; } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 389fffe27..008827c62 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -96,7 +96,7 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array<int, 3> expected_version = { 3, 8, 0 }; + static constexpr std::array<int, 3> expected_version = {3, 8, 0}; static const std::wstring version_check_arguments = L"--version"; const fs::path downloaded_copy = downloads_folder / "cmake-3.8.0-win32-x86" / "bin" / "cmake.exe"; @@ -120,7 +120,7 @@ namespace vcpkg fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array<int, 3> expected_version = { 3, 3, 0 }; + static constexpr std::array<int, 3> expected_version = {3, 3, 0}; static const std::wstring version_check_arguments = L""; const fs::path downloaded_copy = downloads_folder / "nuget-3.5.0" / "nuget.exe"; @@ -141,7 +141,7 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array<int, 3> expected_version = { 2, 0, 0 }; + static constexpr std::array<int, 3> expected_version = {2, 0, 0}; static const std::wstring version_check_arguments = L"--version"; const fs::path downloaded_copy = downloads_folder / "MinGit-2.11.1-32-bit" / "cmd" / "git.exe"; @@ -301,7 +301,7 @@ namespace vcpkg paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - return { dumpbin_path, vcvarsall_bat, L"v141" }; + return {dumpbin_path, vcvarsall_bat, L"v141"}; } } } @@ -319,7 +319,7 @@ namespace vcpkg paths_examined.push_back(vs2015_dumpbin_exe); if (fs.exists(vs2015_dumpbin_exe)) { - return { vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140" }; + return {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"}; } } } diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index d97a25b9c..467fc9a64 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -237,7 +237,7 @@ namespace vcpkg::COFFFileReader read_and_verify_PE_signature(fs); CoffFileHeader header = CoffFileHeader::read(fs); MachineType machine = header.machineType(); - return { machine }; + return {machine}; } struct Marker @@ -303,6 +303,6 @@ namespace vcpkg::COFFFileReader machine_types.insert(machine); } - return { std::vector<MachineType>(machine_types.cbegin(), machine_types.cend()) }; + return {std::vector<MachineType>(machine_types.cbegin(), machine_types.cend())}; } } diff --git a/toolsrc/src/commands_available_commands.cpp b/toolsrc/src/commands_available_commands.cpp index efe4ff740..ec80fea5d 100644 --- a/toolsrc/src/commands_available_commands.cpp +++ b/toolsrc/src/commands_available_commands.cpp @@ -7,10 +7,13 @@ namespace vcpkg::Commands const std::vector<PackageNameAndFunction<CommandTypeA>>& get_available_commands_type_a() { static std::vector<PackageNameAndFunction<CommandTypeA>> t = { - { "install", &Install::perform_and_exit }, { "ci", &CI::perform_and_exit }, - { "remove", &Remove::perform_and_exit }, { "build", &Build::perform_and_exit }, - { "env", &Env::perform_and_exit }, { "build-external", &BuildExternal::perform_and_exit }, - { "export", &Export::perform_and_exit }, + {"install", &Install::perform_and_exit}, + {"ci", &CI::perform_and_exit}, + {"remove", &Remove::perform_and_exit}, + {"build", &Build::perform_and_exit}, + {"env", &Env::perform_and_exit}, + {"build-external", &BuildExternal::perform_and_exit}, + {"export", &Export::perform_and_exit}, }; return t; } @@ -18,19 +21,19 @@ namespace vcpkg::Commands const std::vector<PackageNameAndFunction<CommandTypeB>>& get_available_commands_type_b() { static std::vector<PackageNameAndFunction<CommandTypeB>> t = { - { "/?", &Help::perform_and_exit }, - { "help", &Help::perform_and_exit }, - { "search", &Search::perform_and_exit }, - { "list", &List::perform_and_exit }, - { "integrate", &Integrate::perform_and_exit }, - { "owns", &Owns::perform_and_exit }, - { "update", &Update::perform_and_exit }, - { "depend-info", &DependInfo::perform_and_exit }, - { "edit", &Edit::perform_and_exit }, - { "create", &Create::perform_and_exit }, - { "import", &Import::perform_and_exit }, - { "cache", &Cache::perform_and_exit }, - { "portsdiff", &PortsDiff::perform_and_exit }, + {"/?", &Help::perform_and_exit}, + {"help", &Help::perform_and_exit}, + {"search", &Search::perform_and_exit}, + {"list", &List::perform_and_exit}, + {"integrate", &Integrate::perform_and_exit}, + {"owns", &Owns::perform_and_exit}, + {"update", &Update::perform_and_exit}, + {"depend-info", &DependInfo::perform_and_exit}, + {"edit", &Edit::perform_and_exit}, + {"create", &Create::perform_and_exit}, + {"import", &Import::perform_and_exit}, + {"cache", &Cache::perform_and_exit}, + {"portsdiff", &PortsDiff::perform_and_exit}, }; return t; } @@ -38,9 +41,9 @@ namespace vcpkg::Commands const std::vector<PackageNameAndFunction<CommandTypeC>>& get_available_commands_type_c() { static std::vector<PackageNameAndFunction<CommandTypeC>> t = { - { "version", &Version::perform_and_exit }, - { "contact", &Contact::perform_and_exit }, - { "hash", &Hash::perform_and_exit }, + {"version", &Version::perform_and_exit}, + {"contact", &Contact::perform_and_exit}, + {"hash", &Hash::perform_and_exit}, }; return t; } diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index ec7748e7b..0a73a8551 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -64,7 +64,7 @@ namespace vcpkg::Commands::Build // Fail the build if any dependencies were missing if (!missing_specs.empty()) { - return { BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(missing_specs) }; + return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(missing_specs)}; } } @@ -77,12 +77,12 @@ namespace vcpkg::Commands::Build const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, ports_cmake_script_path, - { { L"CMD", L"BUILD" }, - { L"PORT", source_paragraph.name }, - { L"CURRENT_PORT_DIR", port_dir / "/." }, - { L"TARGET_TRIPLET", triplet.canonical_name() }, - { L"VCPKG_PLATFORM_TOOLSET", toolset.version }, - { L"GIT", git_exe_path } }); + {{L"CMD", L"BUILD"}, + {L"PORT", source_paragraph.name}, + {L"CURRENT_PORT_DIR", port_dir / "/."}, + {L"TARGET_TRIPLET", triplet.canonical_name()}, + {L"VCPKG_PLATFORM_TOOLSET", toolset.version}, + {L"GIT", git_exe_path}}); const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); @@ -96,14 +96,14 @@ namespace vcpkg::Commands::Build { Metrics::track_property("error", "build failed"); Metrics::track_property("build_error", spec.to_string()); - return { BuildResult::BUILD_FAILED, {} }; + return {BuildResult::BUILD_FAILED, {}}; } const size_t error_count = PostBuildLint::perform_all_checks(spec, paths); if (error_count != 0) { - return { BuildResult::POST_BUILD_CHECKS_FAILED, {} }; + return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; } create_binary_control_file(paths, source_paragraph, triplet); @@ -111,7 +111,7 @@ namespace vcpkg::Commands::Build // const fs::path port_buildtrees_dir = paths.buildtrees / spec.name; // delete_directory(port_buildtrees_dir); - return { BuildResult::SUCCEEDED, {} }; + return {BuildResult::SUCCEEDED, {}}; } const std::string& to_string(const BuildResult build_result) @@ -205,7 +205,7 @@ namespace vcpkg::Commands::Build Input::check_and_get_package_spec(args.command_arguments.at(0), default_triplet, example); Input::check_triplet(spec.triplet(), paths); const std::unordered_set<std::string> options = - args.check_and_get_optional_command_arguments({ OPTION_CHECKS_ONLY }); + args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); perform_and_exit(spec, paths.port_dir(spec), options, paths); } } diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index 26f5a4938..7f85b776a 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -20,7 +20,7 @@ namespace vcpkg::Commands::Create const fs::path& cmake_exe = paths.get_cmake_exe(); - std::vector<CMakeVariable> cmake_args{ { L"CMD", L"CREATE" }, { L"PORT", port_name }, { L"URL", url } }; + std::vector<CMakeVariable> cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}}; if (args.command_arguments.size() >= 3) { @@ -30,7 +30,7 @@ namespace vcpkg::Commands::Create R"(Filename cannot contain invalid chars %s, but was %s)", Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name); - cmake_args.push_back({ L"FILENAME", zip_file_name }); + cmake_args.push_back({L"FILENAME", zip_file_name}); } const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index cc1a6c4a4..b936fe88c 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -62,8 +62,8 @@ namespace vcpkg::Commands::Export static void print_plan(const std::map<ExportPlanType, std::vector<const ExportPlanAction*>>& group_by_plan_type) { - static constexpr std::array<ExportPlanType, 2> order = { ExportPlanType::ALREADY_BUILT, - ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT }; + static constexpr std::array<ExportPlanType, 2> order = {ExportPlanType::ALREADY_BUILT, + ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; for (const ExportPlanType plan_type : order) { @@ -219,7 +219,7 @@ namespace vcpkg::Commands::Export Input::check_triplet(spec.triplet(), paths); const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments( - { OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, OPTION_ZIP, OPTION_7ZIP }); + {OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, OPTION_ZIP, OPTION_7ZIP}); const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); const bool raw = options.find(OPTION_RAW) != options.cend(); const bool nuget = options.find(OPTION_NUGET) != options.cend(); @@ -305,14 +305,14 @@ namespace vcpkg::Commands::Export // Copy files needed for integration const std::vector<fs::path> integration_files_relative_to_root = { - { ".vcpkg-root" }, - { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "applocal.ps1" }, - { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "vcpkg.targets" }, - { fs::path{ "scripts" } / "buildsystems" / "vcpkg.cmake" }, - { fs::path{ "scripts" } / "cmake" / "vcpkg_get_windows_sdk.cmake" }, - { fs::path{ "scripts" } / "getWindowsSDK.ps1" }, - { fs::path{ "scripts" } / "getProgramFilesPlatformBitness.ps1" }, - { fs::path{ "scripts" } / "getProgramFiles32bit.ps1" }, + {".vcpkg-root"}, + {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, + {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, + {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, + {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, + {fs::path{"scripts"} / "getWindowsSDK.ps1"}, + {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, + {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, }; for (const fs::path& file : integration_files_relative_to_root) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index bc77d6a9f..20fdbcdf5 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -174,9 +174,8 @@ namespace vcpkg::Commands::Install static void print_plan(const std::map<InstallPlanType, std::vector<const InstallPlanAction*>>& group_by_plan_type) { - static constexpr std::array<InstallPlanType, 3> order = { InstallPlanType::ALREADY_INSTALLED, - InstallPlanType::BUILD_AND_INSTALL, - InstallPlanType::INSTALL }; + static constexpr std::array<InstallPlanType, 3> order = { + InstallPlanType::ALREADY_INSTALLED, InstallPlanType::BUILD_AND_INSTALL, InstallPlanType::INSTALL}; for (const InstallPlanType plan_type : order) { @@ -277,8 +276,7 @@ namespace vcpkg::Commands::Install for (auto&& spec : specs) Input::check_triplet(spec.triplet(), paths); - const std::unordered_set<std::string> options = - args.check_and_get_optional_command_arguments({ OPTION_DRY_RUN }); + const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_DRY_RUN}); const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); // create the plan diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index 7d5e55d22..89f18c664 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -10,8 +10,7 @@ namespace vcpkg::Commands::Integrate { static const std::array<fs::path, 2> old_system_target_files = { System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets" - }; + System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; static const fs::path system_wide_targets_file = System::get_ProgramFiles_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; @@ -114,7 +113,7 @@ namespace vcpkg::Commands::Integrate static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { - SHELLEXECUTEINFO shExInfo = { 0 }; + SHELLEXECUTEINFO shExInfo = {0}; shExInfo.cbSize = sizeof(shExInfo); shExInfo.fMask = SEE_MASK_NOCLOSEPROCESS; shExInfo.hwnd = nullptr; diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index a4c847764..996d41f92 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -57,7 +57,7 @@ namespace vcpkg::Commands::PortsDiff continue; } - output.push_back({ name, VersionDiff(previous_version, current_version) }); + output.push_back({name, VersionDiff(previous_version, current_version)}); } return output; diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index d52c9347b..6a8d4af1e 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -89,8 +89,7 @@ namespace vcpkg::Commands::Remove static void print_plan(const std::map<RemovePlanType, std::vector<const RemovePlanAction*>>& group_by_plan_type) { - static constexpr std::array<RemovePlanType, 2> order = { RemovePlanType::NOT_INSTALLED, - RemovePlanType::REMOVE }; + static constexpr std::array<RemovePlanType, 2> order = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE}; for (const RemovePlanType plan_type : order) { @@ -135,9 +134,11 @@ namespace vcpkg::Commands::Remove }; static constexpr Option options_table[] = { - Option{ "--purge", SINGLE_WITH_NO }, Option{ "--recurse", SINGLE_WITH_NO }, - Option{ "--dry-run", SINGLE_WITH_NO }, Option{ "--outdated", SINGLE }, - Option{ "--logfile", VALUE }, + Option{"--purge", SINGLE_WITH_NO}, + Option{"--recurse", SINGLE_WITH_NO}, + Option{"--dry-run", SINGLE_WITH_NO}, + Option{"--outdated", SINGLE}, + Option{"--logfile", VALUE}, }; static constexpr CStringView OPTION_PURGE = "--purge"; @@ -148,7 +149,7 @@ namespace vcpkg::Commands::Remove static const std::string example = Commands::Help::create_example_string("remove zlib zlib:x64-windows curl boost"); const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments( - { OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED }); + {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); StatusParagraphs status_db = database_load_check(paths); std::vector<PackageSpec> specs; diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 44b4779a6..0ba7305e9 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -59,7 +59,7 @@ namespace vcpkg::Commands::Search "The argument should be a substring to search for, or no argument to display all libraries.\n%s", Commands::Help::create_example_string("search png")); args.check_max_arg_count(1, example); - const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({ OPTION_GRAPH }); + const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_GRAPH}); const std::vector<SourceParagraph> source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 5cc000649..1873c280c 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -32,7 +32,7 @@ namespace vcpkg::Commands::Update } if (it->second != pgh->package.version) { - output.push_back({ pgh->package.spec, VersionDiff(pgh->package.version, it->second) }); + output.push_back({pgh->package.spec, VersionDiff(pgh->package.version, it->second)}); } } diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 67b06d3f1..7992f3e51 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -32,7 +32,7 @@ namespace vcpkg::Metrics static std::string generate_random_UUID() { - int partSizes[] = { 8, 4, 4, 4, 12 }; + int partSizes[] = {8, 4, 4, 4, 12}; char uuid[37]; memset(uuid, 0, sizeof(uuid)); int num; @@ -99,8 +99,8 @@ namespace vcpkg::Metrics else if (ch < 0x20 || ch >= 0x80) { // Note: this treats incoming Strings as Latin-1 - static constexpr const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + static constexpr const char hex[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; encoded.append("\\u00"); encoded.push_back(hex[ch / 16]); encoded.push_back(hex[ch % 16]); diff --git a/toolsrc/src/tests_arguments.cpp b/toolsrc/src/tests_arguments.cpp index eef04cc61..bf0a86836 100644 --- a/toolsrc/src/tests_arguments.cpp +++ b/toolsrc/src/tests_arguments.cpp @@ -14,7 +14,7 @@ namespace UnitTest1 {
TEST_METHOD(create_from_arg_sequence_options_lower)
{
- std::vector<std::string> t = { "--vcpkg-root", "C:\\vcpkg", "--debug", "--sendmetrics", "--printmetrics" };
+ std::vector<std::string> t = {"--vcpkg-root", "C:\\vcpkg", "--debug", "--sendmetrics", "--printmetrics"};
auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size());
Assert::AreEqual("C:\\vcpkg", v.vcpkg_root_dir.get()->c_str());
Assert::IsTrue(vcpkg::OptBoolC::ENABLED == v.debug);
@@ -24,7 +24,7 @@ namespace UnitTest1 TEST_METHOD(create_from_arg_sequence_options_upper)
{
- std::vector<std::string> t = { "--VCPKG-ROOT", "C:\\vcpkg", "--DEBUG", "--SENDMETRICS", "--PRINTMETRICS" };
+ std::vector<std::string> t = {"--VCPKG-ROOT", "C:\\vcpkg", "--DEBUG", "--SENDMETRICS", "--PRINTMETRICS"};
auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size());
Assert::AreEqual("C:\\vcpkg", v.vcpkg_root_dir.get()->c_str());
Assert::IsTrue(vcpkg::OptBoolC::ENABLED == v.debug);
diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 50548dbc1..caa5b97eb 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -25,7 +25,7 @@ namespace UnitTest1 { TEST_METHOD(SourceParagraph_Construct_Minimum) { - vcpkg::SourceParagraph pgh({ { "Source", "zlib" }, { "Version", "1.2.8" } }); + vcpkg::SourceParagraph pgh({{"Source", "zlib"}, {"Version", "1.2.8"}}); Assert::AreEqual("zlib", pgh.name.c_str()); Assert::AreEqual("1.2.8", pgh.version.c_str()); @@ -36,11 +36,11 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Construct_Maximum) { - vcpkg::SourceParagraph pgh({ { "Source", "s" }, - { "Version", "v" }, - { "Maintainer", "m" }, - { "Description", "d" }, - { "Build-Depends", "bd" } }); + vcpkg::SourceParagraph pgh({{"Source", "s"}, + {"Version", "v"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Build-Depends", "bd"}}); Assert::AreEqual("s", pgh.name.c_str()); Assert::AreEqual("v", pgh.version.c_str()); Assert::AreEqual("m", pgh.maintainer.c_str()); @@ -51,8 +51,7 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Two_Depends) { - vcpkg::SourceParagraph pgh( - { { "Source", "zlib" }, { "Version", "1.2.8" }, { "Build-Depends", "z, openssl" } }); + vcpkg::SourceParagraph pgh({{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}}); Assert::AreEqual(size_t(2), pgh.depends.size()); Assert::AreEqual("z", pgh.depends[0].name.c_str()); @@ -62,7 +61,7 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Three_Depends) { vcpkg::SourceParagraph pgh( - { { "Source", "zlib" }, { "Version", "1.2.8" }, { "Build-Depends", "z, openssl, xyz" } }); + {{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}}); Assert::AreEqual(size_t(3), pgh.depends.size()); Assert::AreEqual("z", pgh.depends[0].name.c_str()); @@ -73,7 +72,7 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) { vcpkg::SourceParagraph pgh( - { { "Source", "zlib" }, { "Version", "1.2.8" }, { "Build-Depends", "libA [windows], libB [uwp]" } }); + {{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}}); Assert::AreEqual("zlib", pgh.name.c_str()); Assert::AreEqual("1.2.8", pgh.version.c_str()); @@ -89,10 +88,7 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_Construct_Minimum) { vcpkg::BinaryParagraph pgh({ - { "Package", "zlib" }, - { "Version", "1.2.8" }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, + {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"}, }); Assert::AreEqual("zlib", pgh.spec.name().c_str()); @@ -105,13 +101,13 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_Construct_Maximum) { - vcpkg::BinaryParagraph pgh({ { "Package", "s" }, - { "Version", "v" }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, - { "Maintainer", "m" }, - { "Description", "d" }, - { "Depends", "bd" } }); + vcpkg::BinaryParagraph pgh({{"Package", "s"}, + {"Version", "v"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Depends", "bd"}}); Assert::AreEqual("s", pgh.spec.name().c_str()); Assert::AreEqual("v", pgh.version.c_str()); Assert::AreEqual("m", pgh.maintainer.c_str()); @@ -123,11 +119,11 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_Three_Depends) { vcpkg::BinaryParagraph pgh({ - { "Package", "zlib" }, - { "Version", "1.2.8" }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, - { "Depends", "a, b, c" }, + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "a, b, c"}, }); Assert::AreEqual(size_t(3), pgh.depends.size()); @@ -279,10 +275,7 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_serialize_min) { vcpkg::BinaryParagraph pgh({ - { "Package", "zlib" }, - { "Version", "1.2.8" }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, + {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"}, }); std::string ss = Strings::serialize(pgh); auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); @@ -297,13 +290,13 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_serialize_max) { vcpkg::BinaryParagraph pgh({ - { "Package", "zlib" }, - { "Version", "1.2.8" }, - { "Architecture", "x86-windows" }, - { "Description", "first line\n second line" }, - { "Maintainer", "abc <abc@abc.abc>" }, - { "Depends", "dep" }, - { "Multi-Arch", "same" }, + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Description", "first line\n second line"}, + {"Maintainer", "abc <abc@abc.abc>"}, + {"Depends", "dep"}, + {"Multi-Arch", "same"}, }); std::string ss = Strings::serialize(pgh); auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); @@ -320,11 +313,11 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_serialize_multiple_deps) { vcpkg::BinaryParagraph pgh({ - { "Package", "zlib" }, - { "Version", "1.2.8" }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, - { "Depends", "a, b, c" }, + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "a, b, c"}, }); std::string ss = Strings::serialize(pgh); auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 33a3a757f..e84818eb1 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -168,17 +168,16 @@ namespace vcpkg::Dependencies ? RequestType::USER_REQUESTED : RequestType::AUTO_SELECTED; auto it = status_db.find_installed(spec); - if (it != status_db.end()) - return InstallPlanAction{ spec, { *it->get(), nullopt, nullopt }, request_type }; + if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; Expected<BinaryParagraph> maybe_bpgh = Paragraphs::try_load_cached_package(paths, spec); if (auto bpgh = maybe_bpgh.get()) - return InstallPlanAction{ spec, { nullopt, *bpgh, nullopt }, request_type }; + return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; Expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); if (auto spgh = maybe_spgh.get()) - return InstallPlanAction{ spec, { nullopt, nullopt, *spgh }, request_type }; + return InstallPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } @@ -186,7 +185,7 @@ namespace vcpkg::Dependencies const std::unordered_set<PackageSpec> specs_as_set(specs.cbegin(), specs.cend()); std::vector<InstallPlanAction> toposort = - Graphs::topological_sort(specs, InstallAdjacencyProvider{ paths, status_db, specs_as_set }); + Graphs::topological_sort(specs, InstallAdjacencyProvider{paths, status_db, specs_as_set}); Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { return plan.request_type == RequestType::AUTO_SELECTED && plan.plan_type == InstallPlanType::ALREADY_INSTALLED; @@ -241,15 +240,15 @@ namespace vcpkg::Dependencies const StatusParagraphs::const_iterator it = status_db.find_installed(spec); if (it == status_db.end()) { - return RemovePlanAction{ spec, RemovePlanType::NOT_INSTALLED, request_type }; + return RemovePlanAction{spec, RemovePlanType::NOT_INSTALLED, request_type}; } - return RemovePlanAction{ spec, RemovePlanType::REMOVE, request_type }; + return RemovePlanAction{spec, RemovePlanType::REMOVE, request_type}; } }; const std::vector<StatusParagraph*>& installed_ports = get_installed_ports(status_db); const std::unordered_set<PackageSpec> specs_as_set(specs.cbegin(), specs.cend()); - return Graphs::topological_sort(specs, RemoveAdjacencyProvider{ status_db, installed_ports, specs_as_set }); + return Graphs::topological_sort(specs, RemoveAdjacencyProvider{status_db, installed_ports, specs_as_set}); } std::vector<ExportPlanAction> create_export_plan(const VcpkgPaths& paths, @@ -282,20 +281,20 @@ namespace vcpkg::Dependencies Expected<BinaryParagraph> maybe_bpgh = Paragraphs::try_load_cached_package(paths, spec); if (auto bpgh = maybe_bpgh.get()) - return ExportPlanAction{ spec, { nullopt, *bpgh, nullopt }, request_type }; + return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; Expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); if (auto spgh = maybe_spgh.get()) - return ExportPlanAction{ spec, { nullopt, nullopt, *spgh }, request_type }; + return ExportPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; - return ExportPlanAction{ spec, { nullopt, nullopt, nullopt }, request_type }; + return ExportPlanAction{spec, {nullopt, nullopt, nullopt}, request_type}; } }; const std::unordered_set<PackageSpec> specs_as_set(specs.cbegin(), specs.cend()); std::vector<ExportPlanAction> toposort = - Graphs::topological_sort(specs, ExportAdjacencyProvider{ paths, status_db, specs_as_set }); + Graphs::topological_sort(specs, ExportAdjacencyProvider{paths, status_db, specs_as_set}); return toposort; } } diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 7c06759af..abbed587c 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -129,7 +129,7 @@ namespace vcpkg::System auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); if (pipe == nullptr) { - return { 1, output }; + return {1, output}; } while (fgets(buf, 1024, pipe)) { @@ -137,10 +137,10 @@ namespace vcpkg::System } if (!feof(pipe)) { - return { 1, output }; + return {1, output}; } auto ec = _pclose(pipe); - return { ec, output }; + return {ec, output}; } std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args) diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index af0d1baba..001ce839e 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -207,8 +207,7 @@ namespace vcpkg [](const std::string& file) { return file.back() == '/'; }); StatusParagraphAndAssociatedFiles pgh_and_files = { - *pgh, SortedVector<std::string>(std::move(installed_files_of_current_pgh)) - }; + *pgh, SortedVector<std::string>(std::move(installed_files_of_current_pgh))}; installed_files.push_back(std::move(pgh_and_files)); } |
