Switched to integer naming conventions from C++0x (e.g. uint16_t)
This commit is contained in:
@@ -28,7 +28,7 @@ namespace PolyVox
|
||||
{
|
||||
//Note: this function only works for inputs which are a power of two and not zero
|
||||
//If this is not the case then the output is undefined.
|
||||
uint8 logBase2(uint32 uInput)
|
||||
uint8_t logBase2(uint32_t uInput)
|
||||
{
|
||||
//Debug mode validation
|
||||
assert(uInput != 0);
|
||||
@@ -44,16 +44,16 @@ namespace PolyVox
|
||||
throw std::invalid_argument("Input must be a power of two in order to compute the log.");
|
||||
}
|
||||
|
||||
uint32 uResult = 0;
|
||||
uint32_t uResult = 0;
|
||||
while( (uInput >> uResult) != 0)
|
||||
{
|
||||
++uResult;
|
||||
}
|
||||
return static_cast<uint8>(uResult-1);
|
||||
return static_cast<uint8_t>(uResult-1);
|
||||
}
|
||||
|
||||
|
||||
bool isPowerOf2(uint32 uInput)
|
||||
bool isPowerOf2(uint32_t uInput)
|
||||
{
|
||||
if(uInput == 0)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user