From 03c4c7f8c49d103f57fe12899526b27fc8ccc452 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 19:32:07 -0700 Subject: Use System::println() with no args --- toolsrc/src/PostBuildLint.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'toolsrc/src/PostBuildLint.cpp') diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index a5d923ad2..473c81cfa 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -10,9 +10,9 @@ #include "vcpkg_System.h" #include "vcpkg_Util.h" -using vcpkg::Build::PreBuildInfo; using vcpkg::Build::BuildInfo; using vcpkg::Build::BuildPolicy; +using vcpkg::Build::PreBuildInfo; namespace vcpkg::PostBuildLint { @@ -369,12 +369,12 @@ namespace vcpkg::PostBuildLint std::vector binaries_with_invalid_architecture) { System::println(System::Color::warning, "The following files were built for an incorrect architecture:"); - System::println(""); + System::println(); for (const FileAndArch& b : binaries_with_invalid_architecture) { System::println(" %s", b.file.generic_string()); System::println("Expected %s, but was: %s", expected_architecture, b.actual_arch); - System::println(""); + System::println(); } } @@ -487,7 +487,7 @@ namespace vcpkg::PostBuildLint System::println(System::Color::warning, "Release binaries were not found"); } - System::println(""); + System::println(); return LintStatus::ERROR_DETECTED; } @@ -621,12 +621,12 @@ namespace vcpkg::PostBuildLint System::println(System::Color::warning, "Expected %s crt linkage, but the following libs had invalid crt linkage:", expected_build_type.to_string()); - System::println(""); + System::println(); for (const BuildType_and_file btf : libs_with_invalid_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); } - System::println(""); + System::println(); System::println(System::Color::warning, "To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib"); @@ -675,12 +675,12 @@ namespace vcpkg::PostBuildLint if (!dlls_with_outdated_crt.empty()) { System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); - System::println(""); + System::println(); for (const OutdatedDynamicCrt_and_file btf : dlls_with_outdated_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); } - System::println(""); + System::println(); System::println(System::Color::warning, "To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll"); -- cgit v1.2.3 From badecd4207902b5faebb07a2c2f807f345994040 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:03:54 -0700 Subject: CoffFileReader naming convention --- toolsrc/src/PostBuildLint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/PostBuildLint.cpp') diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 473c81cfa..8c04b94a0 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -389,7 +389,7 @@ namespace vcpkg::PostBuildLint file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string()); - COFFFileReader::DllInfo info = COFFFileReader::read_dll(file); + CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); const std::string actual_architecture = get_actual_architecture(info.machine_type); if (expected_architecture != actual_architecture) @@ -418,7 +418,7 @@ namespace vcpkg::PostBuildLint file.extension() == ".lib", "The file extension was not .lib: %s", file.generic_string()); - COFFFileReader::LibInfo info = COFFFileReader::read_lib(file); + CoffFileReader::LibInfo info = CoffFileReader::read_lib(file); // This is zero for folly's debug library // TODO: Why? -- cgit v1.2.3 From 07c963f36930a34050c57119c227cd95ea6d60aa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:04:39 -0700 Subject: Add missing const --- toolsrc/src/PostBuildLint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/PostBuildLint.cpp') diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 8c04b94a0..a30648163 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -389,7 +389,7 @@ namespace vcpkg::PostBuildLint file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string()); - CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); + const CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); const std::string actual_architecture = get_actual_architecture(info.machine_type); if (expected_architecture != actual_architecture) -- cgit v1.2.3 From b72c904719953c3b372c392c3a925609f4861f10 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:05:13 -0700 Subject: Naming convention fixes --- toolsrc/src/PostBuildLint.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'toolsrc/src/PostBuildLint.cpp') diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index a30648163..1fd48d3ec 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -40,7 +40,7 @@ namespace vcpkg::PostBuildLint const std::vector& get_outdated_dynamic_crts() { - static const std::vector v_no_msvcrt = { + static const std::vector V_NO_MSVCRT = { {"msvcp100.dll", R"(msvcp100\.dll)"}, {"msvcp100d.dll", R"(msvcp100d\.dll)"}, {"msvcp110.dll", R"(msvcp110\.dll)"}, @@ -59,7 +59,7 @@ namespace vcpkg::PostBuildLint {"msvcrt20.dll", R"(msvcrt20\.dll)"}, {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; - return v_no_msvcrt; + return V_NO_MSVCRT; } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, @@ -580,7 +580,7 @@ namespace vcpkg::PostBuildLint return LintStatus::SUCCESS; } - struct BuildType_and_file + struct BuildTypeAndFile { fs::path file; BuildType build_type; @@ -594,7 +594,7 @@ namespace vcpkg::PostBuildLint bad_build_types.erase(std::remove(bad_build_types.begin(), bad_build_types.end(), expected_build_type), bad_build_types.end()); - std::vector libs_with_invalid_crt; + std::vector libs_with_invalid_crt; for (const fs::path& lib : libs) { @@ -622,7 +622,7 @@ namespace vcpkg::PostBuildLint "Expected %s crt linkage, but the following libs had invalid crt linkage:", expected_build_type.to_string()); System::println(); - for (const BuildType_and_file btf : libs_with_invalid_crt) + for (const BuildTypeAndFile btf : libs_with_invalid_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); } @@ -636,12 +636,12 @@ namespace vcpkg::PostBuildLint return LintStatus::SUCCESS; } - struct OutdatedDynamicCrt_and_file + struct OutdatedDynamicCrtAndFile { fs::path file; OutdatedDynamicCrt outdated_crt; - OutdatedDynamicCrt_and_file() = delete; + OutdatedDynamicCrtAndFile() = delete; }; static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, @@ -650,7 +650,7 @@ namespace vcpkg::PostBuildLint { if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS; - std::vector dlls_with_outdated_crt; + std::vector dlls_with_outdated_crt; for (const fs::path& dll : dlls) { @@ -676,7 +676,7 @@ namespace vcpkg::PostBuildLint { System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); System::println(); - for (const OutdatedDynamicCrt_and_file btf : dlls_with_outdated_crt) + for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); } -- cgit v1.2.3