IceUtils.cpp
Go to the documentation of this file.
1 
8 
11 // Precompiled Header
12 #include "Stdafx.h"
13 
14 using namespace IceCore;
15 
17 
25 {
26  // Returns 0 for null addresses
27  if(!address) return 0;
28 
29  // Test all bits
30  udword Align = 1;
31  for(udword i=1;i<32;i++)
32  {
33  // Returns as soon as the alignment is broken
34  if(address&Align) return Align;
35  Align<<=1;
36  }
37  // Here all bits are null, except the highest one (else the address would be null)
38  return Align;
39 }
i
png_uint_32 i
Definition: png.h:2732
Alignment
FUNCTION ICECORE_API udword Alignment(udword address)
udword
unsigned int udword
sizeof(udword) must be 4
Definition: IceTypes.h:65
IceCore
Definition: OPC_IceHook.h:41
Stdafx.h


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:03