Skip to content

Commit

Permalink
fix clang16 errors
Browse files Browse the repository at this point in the history
estebanfer committed Sep 8, 2023
1 parent 40018a6 commit 063a582
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -132,6 +132,11 @@ if(BUILD_OVERLUNKY)
endif()
endif()

# Disable error on Clang16
if(CLANG)
target_compile_options(libwavpack PRIVATE "-Wno-implicit-function-declaration")
endif()

# --------------------------------------------------
# toml11
option(toml11_BUILD_TEST OFF)
4 changes: 4 additions & 0 deletions src/game_api/math.hpp
Original file line number Diff line number Diff line change
@@ -99,6 +99,7 @@ struct Vec2
operator--();
return old;
}
Vec2& operator=(const Vec2& a) = default;
bool operator==(const Vec2& a) const
{
return x == a.x && y == a.y;
@@ -217,6 +218,7 @@ struct AABB
new_aabb.offset(-a.x, -a.y);
return new_aabb;
}
AABB& operator=(const AABB& a) = default;
/// Compute area of the AABB, can be zero if one dimension is zero or negative if one dimension is inverted.
float area() const
{
@@ -303,6 +305,7 @@ struct Triangle
new_triangle.offset(-a);
return new_triangle;
}
Triangle& operator=(const Triangle& a) = default;
/// Rotate triangle by an angle, the px/py are just coordinates, not offset from the center
Triangle& rotate(float angle, float px, float py)
{
@@ -440,6 +443,7 @@ struct Quad
new_quad.offset(-a.x, -a.y);
return new_quad;
}
Quad& operator=(const Quad& a) = default;
bool is_null() const
{
return bottom_left_x == 0 && bottom_left_y == 0 && bottom_right_x == 0 && bottom_right_y == 0 /**/

0 comments on commit 063a582

Please sign in to comment.