A collection of basic/generally desirable code I use across multiple C++ projects.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
326 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. #ifndef ULE_UTIL_H
  2. #define ULE_UTIL_H
  3. #define STATIC_ARRAY_LENGTH(a) (sizeof(a)/sizeof(a[0]))
  4. // GCC & CLang
  5. //#define FORCE_INLINE inline __attribute__((__always_inline))
  6. //#define NEVER_INLINE __attribute__((__noinline__))
  7. // VC++
  8. #define FORCE_INLINE __forceinline
  9. #define NEVER_INLINE __declspec(noinline)
  10. #endif