TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
strings.h
Go to the documentation of this file.
1 #ifndef strings_h
2 #define strings_h
3 
4 /* MSVC doesn't define ffs/ffsl. This dummy strings.h header is provided
5  * for both */
6 #include <intrin.h>
7 #pragma intrinsic(_BitScanForward)
8 static __forceinline int ffsl(long x)
9 {
10  unsigned long i;
11 
12  if (_BitScanForward(&i, x))
13  return (i + 1);
14  return (0);
15 }
16 
17 static __forceinline int ffs(int x)
18 {
19 
20  return (ffsl(x));
21 }
22 
23 #endif
static __forceinline int ffsl(long x)
Definition: strings.h:8
static __forceinline int ffs(int x)
Definition: strings.h:17
G3D::int16 x
Definition: Vector2int16.h:37