diff options
author | dan miller | 2007-10-21 08:36:32 +0000 |
---|---|---|
committer | dan miller | 2007-10-21 08:36:32 +0000 |
commit | 2f8d7092bc2c9609fa98d6888106b96f38b22828 (patch) | |
tree | da6c37579258cc965b52a75aee6135fe44237698 /libraries/ode-0.9/OPCODE/Ice/IceUtils.cpp | |
parent | * Committing new PolicyManager based on an ACL system. (diff) | |
download | opensim-SC_OLD-2f8d7092bc2c9609fa98d6888106b96f38b22828.zip opensim-SC_OLD-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.gz opensim-SC_OLD-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.bz2 opensim-SC_OLD-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.xz |
libraries moved to opensim-libs, a new repository
Diffstat (limited to 'libraries/ode-0.9/OPCODE/Ice/IceUtils.cpp')
-rw-r--r-- | libraries/ode-0.9/OPCODE/Ice/IceUtils.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/libraries/ode-0.9/OPCODE/Ice/IceUtils.cpp b/libraries/ode-0.9/OPCODE/Ice/IceUtils.cpp deleted file mode 100644 index 29b6c57..0000000 --- a/libraries/ode-0.9/OPCODE/Ice/IceUtils.cpp +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
2 | /** | ||
3 | * Contains misc. useful macros & defines. | ||
4 | * \file IceUtils.cpp | ||
5 | * \author Pierre Terdiman (collected from various sources) | ||
6 | * \date April, 4, 2000 | ||
7 | */ | ||
8 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
9 | |||
10 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
11 | // Precompiled Header | ||
12 | #include "Stdafx.h" | ||
13 | |||
14 | using namespace IceCore; | ||
15 | |||
16 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
17 | /** | ||
18 | * Returns the alignment of the input address. | ||
19 | * \fn Alignment() | ||
20 | * \param address [in] address to check | ||
21 | * \return the best alignment (e.g. 1 for odd addresses, etc) | ||
22 | */ | ||
23 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
24 | udword IceCore::Alignment(udword address) | ||
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 | } | ||