Commit b8cc8b4
fix(blitter): portable always-inline (MSVC has no GCC attribute)
MSVC x86 / x64 compilation checks failed on PR #129 because
`__attribute__((always_inline))` is GCC/Clang-specific. Wrap it
in a BLITTER_ALWAYS_INLINE macro that maps to:
GCC / Clang: inline __attribute__((always_inline))
MSVC: __forceinline (replaces inline)
Other: inline (best-effort)
The macro spells the inline keyword itself so call sites are just
`static BLITTER_ALWAYS_INLINE void foo(...)` -- no extra INLINE
qualifier (MSVC's __forceinline conflicts with another inline
keyword, which is why the original `static INLINE __attribute__(...)`
form would have failed there even if MSVC understood the attribute).
Verified: clang still inlines (AvP accurate ~196 FPS, same as the
attribute-only form); test suite passes; libretro buildbot's MSVC
target should now build clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent 25278cb commit b8cc8b4
1 file changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
| |||
993 | 1007 | | |
994 | 1008 | | |
995 | 1009 | | |
996 | | - | |
| 1010 | + | |
997 | 1011 | | |
998 | 1012 | | |
999 | 1013 | | |
| |||
1031 | 1045 | | |
1032 | 1046 | | |
1033 | 1047 | | |
1034 | | - | |
| 1048 | + | |
1035 | 1049 | | |
1036 | 1050 | | |
1037 | 1051 | | |
| |||
1119 | 1133 | | |
1120 | 1134 | | |
1121 | 1135 | | |
1122 | | - | |
| 1136 | + | |
1123 | 1137 | | |
1124 | 1138 | | |
1125 | 1139 | | |
| |||
1326 | 1340 | | |
1327 | 1341 | | |
1328 | 1342 | | |
1329 | | - | |
| 1343 | + | |
1330 | 1344 | | |
1331 | 1345 | | |
1332 | 1346 | | |
| |||
0 commit comments