mirror of
https://github.com/bkaradzic/bimg.git
synced 2026-02-17 12:42:35 +01:00
Cleanup.
This commit is contained in:
16
src/bimg_p.h
16
src/bimg_p.h
@@ -31,13 +31,13 @@
|
|||||||
} \
|
} \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define _BIMG_ASSERT(_condition, _format, ...) \
|
#define _BIMG_ASSERT(_condition, _format, ...) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
if (!BX_IGNORE_C4127(_condition) ) \
|
if (!BX_IGNORE_C4127(_condition) \
|
||||||
{ \
|
&& bx::assertFunction(bx::Location::current(), "ASSERT " #_condition " -> " _format, ##__VA_ARGS__) ) \
|
||||||
BX_TRACE("ASSERT " _format, ##__VA_ARGS__); \
|
{ \
|
||||||
bx::debugBreak(); \
|
bx::debugBreak(); \
|
||||||
} \
|
} \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#include <bimg/bimg.h>
|
#include <bimg/bimg.h>
|
||||||
@@ -85,7 +85,7 @@ namespace bimg
|
|||||||
if (_hasMips)
|
if (_hasMips)
|
||||||
{
|
{
|
||||||
const uint32_t max = bx::max(_width, _height, _depth);
|
const uint32_t max = bx::max(_width, _height, _depth);
|
||||||
const uint32_t num = 1 + uint32_t(bx::log2((int32_t)max) );
|
const uint32_t num = 1 + bx::ceilLog2(max);
|
||||||
|
|
||||||
return uint8_t(num);
|
return uint8_t(num);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user