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

#pragma once
#ifndef ULE_UTIL_H
#define ULE_UTIL_H
#define STATIC_ARRAY_LENGTH(a) (sizeof(a)/sizeof(a[0]))
// GCC & CLang
//#define FORCE_INLINE inline __attribute__((__always_inline))
//#define NEVER_INLINE __attribute__((__noinline__))
// VC++
#define FORCE_INLINE __forceinline
#define NEVER_INLINE __declspec(noinline)
#endif