Skip to content

Commit 45bc71a

Browse files
committed
MIN/MAX only valid in C++
* C11 does not support references. * C11 does not support the `typeof` operator (although GCC allows it as an extension)
1 parent 722e920 commit 45bc71a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/gerbv.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,9 @@ void gerbv_transform_coord(double* x, double* y, const gerbv_user_transformation
10931093
/*! Rotate coordinate x and y buy angle in radians */
10941094
void gerbv_rotate_coord(double* x, double* y, double rad);
10951095

1096+
1097+
#if defined(__cplusplus)
1098+
10961099
#undef MIN
10971100
#undef MAX
10981101
#define MIN(x, y) \
@@ -1110,7 +1113,7 @@ void gerbv_rotate_coord(double* x, double* y, double rad);
11101113
_x > _y ? _x : _y; \
11111114
})
11121115
1113-
#if defined(__cplusplus)
1116+
11141117
}
11151118
#endif
11161119

0 commit comments

Comments
 (0)