Skip to content

Commit

Permalink
gne
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Jan 17, 2024
1 parent 1ab3a4c commit 2361ad1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions glm/detail/_swizzle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ namespace detail

GLM_FUNC_QUALIFIER T& operator[](size_t i)
{
const int offset_dst[4] = { E0, E1, E2, E3 };
const std::size_t offset_dst[4] = { E0, E1, E2, E3 };
return this->elem(offset_dst[i]);
}
GLM_FUNC_QUALIFIER T operator[](size_t i) const
{
const int offset_dst[4] = { E0, E1, E2, E3 };
const std::size_t offset_dst[4] = { E0, E1, E2, E3 };
return this->elem(offset_dst[i]);
}

Expand Down
8 changes: 4 additions & 4 deletions test/core/core_force_xyzw_only.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ static int test_comp()
int Error = 0;

{
glm::ivec1 const A(1);
glm::ivec1 A(1);
Error += A.x == 1 ? 0 : 1;
}

{
glm::ivec2 const A(1, 2);
glm::ivec2 A(1, 2);
Error += A.x == 1 ? 0 : 1;
Error += A.y == 2 ? 0 : 1;
}

{
glm::ivec3 const A(1, 2, 3);
glm::ivec3 A(1, 2, 3);
Error += A.x == 1 ? 0 : 1;
Error += A.y == 2 ? 0 : 1;
Error += A.z == 3 ? 0 : 1;
}

{
glm::ivec4 const A(1, 2, 3, 4);
glm::ivec4 A(1, 2, 3, 4);
Error += A.x == 1 ? 0 : 1;
Error += A.y == 2 ? 0 : 1;
Error += A.z == 3 ? 0 : 1;
Expand Down
1 change: 1 addition & 0 deletions test/core/core_type_vec1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wglobal-constructors"
# pragma clang diagnostic ignored "-Wunused-variable"
#endif

static glm::vec1 g1;
Expand Down

0 comments on commit 2361ad1

Please sign in to comment.