diff --git a/toolsrc/include/vcpkg/base/lockguarded.h b/toolsrc/include/vcpkg/base/lockguarded.h index e573ec7b0e..e49b0b5d9a 100644 --- a/toolsrc/include/vcpkg/base/lockguarded.h +++ b/toolsrc/include/vcpkg/base/lockguarded.h @@ -29,7 +29,7 @@ namespace vcpkg::Util LockGuardPtr(LockGuarded& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) { } private: - std::lock_guard m_lock; + std::unique_lock m_lock; T& m_ptr; }; } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index e75f5b7c12..d418f71f55 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -214,7 +214,7 @@ namespace vcpkg::Build static std::remove_const_t generate_all_policies() { - std::remove_const_t res; + std::remove_const_t res{}; for (size_t i = 0; i < res.size(); ++i) { res[i] = static_cast(i);