mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Removing duplicated code.
This commit is contained in:
@@ -126,7 +126,7 @@ struct BgfxCallback : public bgfx::CallbackI
|
||||
virtual void fatal(bgfx::Fatal::Enum _code, const char* _str) BX_OVERRIDE
|
||||
{
|
||||
// Something unexpected happened, inform user and bail out.
|
||||
dbgPrintf("Fatal error: 0x%08x: %s", _code, _str);
|
||||
bx::debugPrintf("Fatal error: 0x%08x: %s", _code, _str);
|
||||
|
||||
// Must terminate, continuing will cause crash anyway.
|
||||
abort();
|
||||
@@ -134,8 +134,8 @@ struct BgfxCallback : public bgfx::CallbackI
|
||||
|
||||
virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) BX_OVERRIDE
|
||||
{
|
||||
dbgPrintf("%s (%d): ", _filePath, _line);
|
||||
dbgPrintfVargs(_format, _argList);
|
||||
bx::debugPrintf("%s (%d): ", _filePath, _line);
|
||||
bx::debugPrintfVargs(_format, _argList);
|
||||
}
|
||||
|
||||
virtual uint32_t cacheReadSize(uint64_t _id) BX_OVERRIDE
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
{
|
||||
if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align)
|
||||
{
|
||||
dbgPrintf("%s(%d): FREE %p\n", _file, _line, _ptr);
|
||||
bx::debugPrintf("%s(%d): FREE %p\n", _file, _line, _ptr);
|
||||
::free(_ptr);
|
||||
--m_numBlocks;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align)
|
||||
{
|
||||
void* ptr = ::malloc(_size);
|
||||
dbgPrintf("%s(%d): ALLOC %p of %d byte(s)\n", _file, _line, ptr, _size);
|
||||
bx::debugPrintf("%s(%d): ALLOC %p of %d byte(s)\n", _file, _line, ptr, _size);
|
||||
++m_numBlocks;
|
||||
m_maxBlocks = bx::uint32_max(m_maxBlocks, m_numBlocks);
|
||||
return ptr;
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align)
|
||||
{
|
||||
void* ptr = ::realloc(_ptr, _size);
|
||||
dbgPrintf("%s(%d): REALLOC %p (old %p) of %d byte(s)\n", _file, _line, ptr, _ptr, _size);
|
||||
bx::debugPrintf("%s(%d): REALLOC %p (old %p) of %d byte(s)\n", _file, _line, ptr, _ptr, _size);
|
||||
|
||||
if (NULL == _ptr)
|
||||
{
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
|
||||
void dumpStats() const
|
||||
{
|
||||
dbgPrintf("Allocator stats: num blocks %d (peak: %d)\n", m_numBlocks, m_maxBlocks);
|
||||
bx::debugPrintf("Allocator stats: num blocks %d (peak: %d)\n", m_numBlocks, m_maxBlocks);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user