Skip to content

Commit

Permalink
Fix compiler errors on MSVC++
Browse files Browse the repository at this point in the history
  • Loading branch information
jovobe committed Jul 23, 2019
1 parent 1caf923 commit 655c58e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions tsl/include/tsl/util/base_handle.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ template <typename idx_t>
void base_handle<idx_t>::set_idx(idx_t idx)
{
#ifndef NDEBUG
if (idx == numeric_limits<idx_t>::max())
if (idx == (numeric_limits<idx_t>::max)())
{
panic("Trying to create a handle with numeric_limits<idx_t>::max() as idx!");
}
Expand Down Expand Up @@ -51,7 +51,7 @@ bool base_handle<idx_t>::operator<(const base_handle& other) const {

template <typename idx_t, typename non_optional_t>
base_optional_handle<idx_t, non_optional_t>::base_optional_handle()
: idx(numeric_limits<idx_t>::max())
: idx((numeric_limits<idx_t>::max)())
{}

template <typename idx_t, typename non_optional_t>
Expand All @@ -72,7 +72,7 @@ base_optional_handle<idx_t, non_optional_t>::base_optional_handle(idx_t idx)
template <typename idx_t, typename non_optional_t>
base_optional_handle<idx_t, non_optional_t>::operator bool() const
{
return idx != numeric_limits<idx_t>::max();
return idx != (numeric_limits<idx_t>::max)();
}

template <typename idx_t, typename non_optional_t>
Expand Down

0 comments on commit 655c58e

Please sign in to comment.