Skip to content

Commit 3380ce9

Browse files
committed
alter windows macro
1 parent d893321 commit 3380ce9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp4rtest/src/test-complex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Helper to initialize Rcomplex portably across compilers
44
// Modern compilers prefer {{r,i}} but older Windows MinGW doesn't support it
55
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
6-
// MinGW on Windows - use direct member initialization
7-
#define MAKE_RCOMPLEX(r, i) []() { Rcomplex c; c.r = (r); c.i = (i); return c; }()
6+
// MinGW on Windows - use direct member initialization with different param names
7+
#define MAKE_RCOMPLEX(real, imag) []() { Rcomplex c; c.r = (real); c.i = (imag); return c; }()
88
#else
99
// Modern compilers - use aggregate initialization
1010
#define MAKE_RCOMPLEX(r, i) Rcomplex{{r, i}}

cpp4rtest/src/test-r_complex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Helper to initialize Rcomplex portably across compilers
44
// Modern compilers prefer {{r,i}} but older Windows MinGW doesn't support it
55
#if defined(_WIN32) && defined(__GNUC__) && !defined(__clang__)
6-
// MinGW on Windows - use direct member initialization
7-
#define MAKE_RCOMPLEX(r, i) []() { Rcomplex c; c.r = (r); c.i = (i); return c; }()
6+
// MinGW on Windows - use direct member initialization with different param names
7+
#define MAKE_RCOMPLEX(real, imag) []() { Rcomplex c; c.r = (real); c.i = (imag); return c; }()
88
#else
99
// Modern compilers - use aggregate initialization
1010
#define MAKE_RCOMPLEX(r, i) Rcomplex{{r, i}}

0 commit comments

Comments
 (0)