Skip to content

Commit

Permalink
[Fix] MSVC C4201 warning
Browse files Browse the repository at this point in the history
Temp fix MSVC C4201 warning that shouldn't trigger (using std=c11) in Rectangle2D.hpp
  • Loading branch information
mrouffet committed Mar 31, 2024
1 parent 9b13e57 commit 1ad3317
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ add_library(SA_Maths STATIC)
SA_ConfigureTarget(SA_Maths)
SA_TargetSources(SA_Maths)

### Temp required to fix MSVC C4201 in Rectangle2D.hpp
target_link_libraries(SA_Maths PUBLIC SA_Support)



# Option
Expand Down
6 changes: 6 additions & 0 deletions Include/SA/Maths/Geometry/Rectangle2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include <SA/Maths/Space/Vector2.hpp>

#include <SA/Support/Pragma.hpp>

/**
* \file Rectangle2D.hpp
*
Expand All @@ -27,6 +29,8 @@ namespace SA
template <typename T>
struct Rect2D
{
SA_PRAGMA_SDWARN_MSVC(4201)

union
{
/// offset.
Expand Down Expand Up @@ -57,6 +61,8 @@ namespace SA
};
};

SA_PRAGMA_EDWARN_MSVC()

/// Default constructor.
Rect2D() = default;

Expand Down
3 changes: 3 additions & 0 deletions ThirdParty/SA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Entrypoints

### Temp required to fix MSVC C4201 in Rectangle2D.hpp
SA_FetchModule(Support)

if(SA_MATHS_USE_LOGGER_OPT)

SA_FetchModule(Logger)
Expand Down

0 comments on commit 1ad3317

Please sign in to comment.