aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorNicole Mazzuca <mazzucan@outlook.com>2019-08-09 11:16:35 -0700
committernicole mazzuca <mazzucan@outlook.com>2019-08-16 19:40:53 -0700
commit300e21d59ebfe42e118cf4e97887f0680fbcfa2f (patch)
treebe8e7550056df9f049044e05dbcb2e5c0910662b /toolsrc/include
parent5d1751dfda36199ae307825e38c80c3dc283b075 (diff)
downloadvcpkg-300e21d59ebfe42e118cf4e97887f0680fbcfa2f.tar.gz
vcpkg-300e21d59ebfe42e118cf4e97887f0680fbcfa2f.zip
[vcpkg] Major tool CMakeLists.txt updates
- Add the "VCPKG_DEVELOPMENT_WARNINGS" flag - setting "WERROR" will also set this flag - This flag is set by default - on GCC/clang, this will pass '-Wall -Wextra -Wpedantic -Werror' - on GCC, this will additionally pass '-Wmissing-declarations' - on clang, this will additionally pass '-Wmissing-prototypes' - on MSVC, this will pass '-W4 -WX' - On Visual Studio 2017 and later, pass '-permissive-' - Change the source for fallout of these changes - add `format` subcommand - formats all C++ source and header files using clang-format - move `include/vcpkg-test/catch.h` to `include/catch2/catch.hpp` - pass CONFIGURE_DEPENDS to file(GLOB)
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/catch2/catch.hpp (renamed from toolsrc/include/vcpkg-test/catch.h)0
-rw-r--r--toolsrc/include/vcpkg-test/util.h2
-rw-r--r--toolsrc/include/vcpkg/base/chrono.h2
-rw-r--r--toolsrc/include/vcpkg/base/graphs.h2
-rw-r--r--toolsrc/include/vcpkg/base/util.h5
5 files changed, 5 insertions, 6 deletions
diff --git a/toolsrc/include/vcpkg-test/catch.h b/toolsrc/include/catch2/catch.hpp
index 303f664ff..303f664ff 100644
--- a/toolsrc/include/vcpkg-test/catch.h
+++ b/toolsrc/include/catch2/catch.hpp
diff --git a/toolsrc/include/vcpkg-test/util.h b/toolsrc/include/vcpkg-test/util.h
index 8a458a3e5..259b0ba7e 100644
--- a/toolsrc/include/vcpkg-test/util.h
+++ b/toolsrc/include/vcpkg-test/util.h
@@ -1,4 +1,4 @@
-#include <vcpkg-test/catch.h>
+#include <catch2/catch.hpp>
#include <vcpkg/pragmas.h>
#include <vcpkg/base/files.h>
diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h
index 89cd15273..118e9c382 100644
--- a/toolsrc/include/vcpkg/base/chrono.h
+++ b/toolsrc/include/vcpkg/base/chrono.h
@@ -56,7 +56,7 @@ namespace vcpkg::Chrono
static Optional<CTime> get_current_date_time();
static Optional<CTime> parse(CStringView str);
- constexpr CTime() noexcept : m_tm{0} {}
+ constexpr CTime() noexcept : m_tm{} {}
explicit constexpr CTime(tm t) noexcept : m_tm{t} {}
CTime add_hours(const int hours) const;
diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h
index 9901a49a0..683735b1c 100644
--- a/toolsrc/include/vcpkg/base/graphs.h
+++ b/toolsrc/include/vcpkg/base/graphs.h
@@ -46,7 +46,7 @@ namespace vcpkg::Graphs
if (!r) return;
for (auto i = c.size(); i > 1; --i)
{
- auto j = r->random(static_cast<int>(i));
+ std::size_t j = r->random(static_cast<int>(i));
if (j != i - 1)
{
std::swap(c[i - 1], c[j]);
diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h
index 90c947aa9..40022a012 100644
--- a/toolsrc/include/vcpkg/base/util.h
+++ b/toolsrc/include/vcpkg/base/util.h
@@ -221,9 +221,8 @@ namespace vcpkg::Util
}
}
- template<class T>
- void unused(T&& param)
+ template<class... Ts>
+ void unused(const Ts&...)
{
- (void)param;
}
}