Skip to content

Commit

Permalink
Hopefully fix build issue with Coord typedef.
Browse files Browse the repository at this point in the history
The build failed on MacOS Sonoma and Visual Studio 17 2022.

The problem was that we were redefining the min, max, round and abs
functions for Coord.  I don't think that is necessary, because
Coord is just a typedef for float and the standard functions from
<cmath> should work for that.

I wasn't able to test this locally, so we'll have to look at the
feedback from GitHub Actions to see if this fix worked or not.
  • Loading branch information
BartVandewoestyne committed Feb 12, 2024
1 parent 3e150b9 commit b51dc0a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions Foundation_Classes/Coord.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,4 @@

typedef float Coord;

Coord min(Coord x, Coord y);
Coord max(Coord x, Coord y);
Coord abs(Coord x);
int round(Coord x);

#endif /* COORD_H */
1 change: 1 addition & 0 deletions Structural_Patterns/Bridge/XWindowImp.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "XWindowImp.h"
#include "Coord.h"
#include <cmath>

void XWindowImp::DeviceRect (
Coord x0, Coord y0, Coord x1, Coord y1
Expand Down

0 comments on commit b51dc0a

Please sign in to comment.