Skip to content

Commit

Permalink
Merge pull request #327 from estebanfer/fix-clang16-errors
Browse files Browse the repository at this point in the history
fix clang 16 errors?
  • Loading branch information
Dregu authored Sep 8, 2023
2 parents 47da0ae + 063a582 commit c4f861c
Show file tree
Hide file tree
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
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/game_api/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 /**/
Expand Down

0 comments on commit c4f861c

Please sign in to comment.