SDL_FORCE_INLINE(3)
π SDL_FORCE_INLINE(3) π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_FORCE_INLINE π«Ά
β¨ NAME β¨
SDL_FORCE_INLINE β a macro that literally demands a function get inlined. no asking nicely, no suggestions, it's giving "you WILL be inlined" π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_begin_code.h>
#define SDL_FORCE_INLINE __forceinline
π¦ DESCRIPTION π¦
So what is this? It's a lil command you hand to your compiler saying "hey, inline this function, k thanks" β¨ SDL uses this macro all up in its public headers for a handful of simple functions β just a few, the lowkey easy ones, you know the vibe.
Now here's the tea π΅: on compilers that don't support forceinline at all, this macro gets defined to static SDL_INLINE instead, which β ngl β is often good enough. not iconic, but it works π
This symbol is used in SDL's headers, but apps and other libraries are totally welcome to use it for their own interfaces as well. it's not gatekept, it's community property, we love to see it π₯°
π AVAILABILITY π
This macro has been available since SDL 3.2.0. so if you're on anything olderβ¦ girl, upgrade π
fr fr: it's just a macro. but it's a macro with main character energy π
Simple Directmedia Layer β SDL 3.4.18 β that's the source and the version, bestie, straight from the SDL_FORCE_INLINE(3) page itself π
stay inlined, stay slay, mwah ππβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms