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.

20 lines
339 B

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