summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp
diff options
context:
space:
mode:
author Branimir Karadžić <branimirkaradzic@gmail.com>2017-03-29 17:09:40 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2017-03-29 17:09:40 +0200
commit49f7c99c7786ce257fae28dfeae2f8ee5810424c (patch)
tree1bbd30dd4dd48596186846c2fc77a8dc748215d2 /3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp
parent79f22e060b2c012d628d5d1d83288c1bb6e6acef (diff)
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp b/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp
index 8d15d6362e0..0ae7877e133 100644
--- a/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp
+++ b/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp
@@ -9,7 +9,6 @@
#include <bgfx/embedded_shader.h>
#include <stddef.h> // offsetof
-#include <memory.h> // memcpy
#include <wchar.h> // wcslen
#include "text_buffer_manager.h"
@@ -252,7 +251,7 @@ void TextBuffer::appendText(FontHandle _fontHandle, const char* _string, const c
if (_end == NULL)
{
- _end = _string + strlen(_string);
+ _end = _string + bx::strnlen(_string);
}
BX_CHECK(_end >= _string);
@@ -802,8 +801,8 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id,
bgfx::TransientVertexBuffer tvb;
bgfx::allocTransientIndexBuffer(&tib, bc.textBuffer->getIndexCount() );
bgfx::allocTransientVertexBuffer(&tvb, bc.textBuffer->getVertexCount(), m_vertexDecl);
- memcpy(tib.data, bc.textBuffer->getIndexBuffer(), indexSize);
- memcpy(tvb.data, bc.textBuffer->getVertexBuffer(), vertexSize);
+ bx::memCopy(tib.data, bc.textBuffer->getIndexBuffer(), indexSize);
+ bx::memCopy(tvb.data, bc.textBuffer->getVertexBuffer(), vertexSize);
bgfx::setVertexBuffer(&tvb, 0, bc.textBuffer->getVertexCount() );
bgfx::setIndexBuffer(&tib, 0, bc.textBuffer->getIndexCount() );
}