aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkglib.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-12 11:22:25 -0700
committerGitHub <noreply@github.com>2017-10-12 11:22:25 -0700
commit85e6b1b36e734c0db50464b07b77589d63c3c875 (patch)
tree095289838517a64f06298b1a05ded47a7139d7d9 /toolsrc/src/vcpkglib.cpp
parentd7a313c5c356e1641f18cd14ad0ac0c3901bc0bf (diff)
parent9c3f9582fb4541a59e4282269e4f6c9c7debcc3e (diff)
downloadvcpkg-85e6b1b36e734c0db50464b07b77589d63c3c875.tar.gz
vcpkg-85e6b1b36e734c0db50464b07b77589d63c3c875.zip
Merge branch 'master' into vtk-components
Diffstat (limited to 'toolsrc/src/vcpkglib.cpp')
-rw-r--r--toolsrc/src/vcpkglib.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp
index 96e9f05e1..5cdafdbc8 100644
--- a/toolsrc/src/vcpkglib.cpp
+++ b/toolsrc/src/vcpkglib.cpp
@@ -39,7 +39,7 @@ namespace vcpkg
{
auto& fs = paths.get_filesystem();
- auto updates_dir = paths.vcpkg_dir_updates;
+ const auto updates_dir = paths.vcpkg_dir_updates;
std::error_code ec;
fs.create_directory(paths.installed, ec);
@@ -90,9 +90,9 @@ namespace vcpkg
static int update_id = 0;
auto& fs = paths.get_filesystem();
- auto my_update_id = update_id++;
- auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete";
- auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id);
+ const auto my_update_id = update_id++;
+ const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete";
+ const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id);
fs.write_contents(tmp_update_filename, Strings::serialize(p));
fs.rename(tmp_update_filename, update_filename);
@@ -189,7 +189,7 @@ namespace vcpkg
for (const std::unique_ptr<StatusParagraph>& pgh : status_db)
{
- if (pgh->state != InstallState::INSTALLED || pgh->package.feature != "")
+ if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty())
{
continue;
}
@@ -233,7 +233,7 @@ namespace vcpkg
const fs::path& cmake_script,
const std::vector<CMakeVariable>& pass_variables)
{
- std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; });
+ const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; });
return Strings::wformat(
LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring());
}