mirror of
https://github.com/HandmadeMath/HandmadeMath.git
synced 2026-01-03 10:12:27 +00:00
Merge pull request #14 from bvisness/option-no-inline
Add ability to disable inlining of functions
This commit is contained in:
@@ -49,6 +49,22 @@
|
||||
#define HANDMADE_MATH_IMPLEMENTATION
|
||||
#define HANDMADE_MATH_NO_SSE
|
||||
|
||||
==========================================================================
|
||||
|
||||
To disable inlining functions, you MUST
|
||||
|
||||
#define HANDMADE_MATH_NO_INLINE
|
||||
|
||||
in EXACTLY one C or C++ file that includes this header, BEFORE the
|
||||
include, like this:
|
||||
|
||||
#define HANDMADE_MATH_IMPLEMENTATION
|
||||
#define HANDMADE_MATH_CPP_MODE
|
||||
#define HANDMADE_MATH_NO_INLINE
|
||||
#include "HandmadeMath.h"
|
||||
|
||||
All other files should just #include "HandmadeMath.h" without the #define.
|
||||
|
||||
Version History:
|
||||
0.2 (*) Updated documentation
|
||||
(*) Better C compliance
|
||||
@@ -111,7 +127,9 @@ extern "C"
|
||||
#define HMMDEF extern
|
||||
#endif
|
||||
|
||||
#if _MSC_VER && !__INTEL_COMPILER
|
||||
#ifdef HANDMADE_MATH_NO_INLINE
|
||||
#define HINLINE
|
||||
#elif _MSC_VER && !__INTEL_COMPILER
|
||||
#define HINLINE __inline
|
||||
#else
|
||||
#define HINLINE inline
|
||||
|
||||
Reference in New Issue
Block a user