From 655c58e37c4953bbe094da8f01427d5b31815d41 Mon Sep 17 00:00:00 2001 From: "Johan M. von Behren" Date: Tue, 23 Jul 2019 19:48:41 +0200 Subject: [PATCH] Fix compiler errors on MSVC++ --- .circleci/config.yml | 9 ++++++--- .gitmodules | 10 +++++----- tsl/include/tsl/util/base_handle.tcc | 6 +++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ba37930..af819e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,19 +12,22 @@ jobs: executor: ubuntu-build steps: - checkout - - run: cd /build && cmake /source -DCMAKE_BUILD_TYPE=Release + - run: git submodule update --init --recursive + - run: cd /build && cmake /source/tse -DCMAKE_BUILD_TYPE=Release - run: cmake --build /build + - run: cmake --build /build --target tsl_tests - persist_to_workspace: root: /build paths: - - test/bin/tsl_tests + - tsl/test/src/tsl_tests test: executor: ubuntu-build steps: + - checkout - attach_workspace: at: /build - - run: /build/test/bin/tsl_tests + - run: cd /source/tsl && /build/tsl/test/src/tsl_tests workflows: version: 2.1 diff --git a/.gitmodules b/.gitmodules index bdf1f19..6a3edae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,15 @@ [submodule "tsl/ext/glm"] path = tsl/ext/glm - url = git@github.com:g-truc/glm.git + url = https://github.com/g-truc/glm.git [submodule "tsl/ext/fmt"] path = tsl/ext/fmt - url = git@github.com:fmtlib/fmt.git + url = https://github.com/fmtlib/fmt.git [submodule "tsl/test/ext/googletest"] path = tsl/test/ext/googletest - url = git@github.com:google/googletest.git + url = https://github.com/google/googletest.git [submodule "tse/ext/glew"] path = tse/ext/glew - url = git@github.com:Perlmint/glew-cmake.git + url = https://github.com/Perlmint/glew-cmake.git [submodule "tse/ext/glfw"] path = tse/ext/glfw - url = git@github.com:glfw/glfw.git + url = https://github.com/glfw/glfw.git diff --git a/tsl/include/tsl/util/base_handle.tcc b/tsl/include/tsl/util/base_handle.tcc index c27ba24..2318a4e 100644 --- a/tsl/include/tsl/util/base_handle.tcc +++ b/tsl/include/tsl/util/base_handle.tcc @@ -23,7 +23,7 @@ template void base_handle::set_idx(idx_t idx) { #ifndef NDEBUG - if (idx == numeric_limits::max()) + if (idx == (numeric_limits::max)()) { panic("Trying to create a handle with numeric_limits::max() as idx!"); } @@ -51,7 +51,7 @@ bool base_handle::operator<(const base_handle& other) const { template base_optional_handle::base_optional_handle() - : idx(numeric_limits::max()) + : idx((numeric_limits::max)()) {} template @@ -72,7 +72,7 @@ base_optional_handle::base_optional_handle(idx_t idx) template base_optional_handle::operator bool() const { - return idx != numeric_limits::max(); + return idx != (numeric_limits::max)(); } template