mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-11-16 04:46:12 +00:00
Renaming string functions.
This commit is contained in:
+15
-15
@@ -986,7 +986,7 @@ namespace bgfx { namespace gl
|
||||
//
|
||||
// If <length> is 0 then <marker> is assumed to be null-terminated.
|
||||
|
||||
uint32_t size = (0 == _length ? (uint32_t)bx::strnlen(_marker) : _length) + 1;
|
||||
uint32_t size = (0 == _length ? (uint32_t)bx::strLen(_marker) : _length) + 1;
|
||||
size *= sizeof(wchar_t);
|
||||
wchar_t* name = (wchar_t*)alloca(size);
|
||||
mbstowcs(name, _marker, size-2);
|
||||
@@ -1045,7 +1045,7 @@ namespace bgfx { namespace gl
|
||||
glGetError(); // ignore error if glGetString returns NULL.
|
||||
if (NULL != str)
|
||||
{
|
||||
return bx::hashMurmur2A(str, (uint32_t)bx::strnlen(str) );
|
||||
return bx::hashMurmur2A(str, (uint32_t)bx::strLen(str) );
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1057,7 +1057,7 @@ namespace bgfx { namespace gl
|
||||
{
|
||||
char name[1024];
|
||||
const char* pos = _extensions;
|
||||
const char* end = _extensions + bx::strnlen(_extensions);
|
||||
const char* end = _extensions + bx::strLen(_extensions);
|
||||
while (pos < end)
|
||||
{
|
||||
uint32_t len;
|
||||
@@ -1068,10 +1068,10 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
else
|
||||
{
|
||||
len = bx::uint32_min(sizeof(name), (uint32_t)bx::strnlen(pos) );
|
||||
len = bx::uint32_min(sizeof(name), (uint32_t)bx::strLen(pos) );
|
||||
}
|
||||
|
||||
bx::strlncpy(name, BX_COUNTOF(name), pos, len);
|
||||
bx::strCopy(name, BX_COUNTOF(name), pos, len);
|
||||
name[len] = '\0';
|
||||
|
||||
BX_TRACE("\t%s", name);
|
||||
@@ -1485,7 +1485,7 @@ namespace bgfx { namespace gl
|
||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_vendorIds); ++ii)
|
||||
{
|
||||
const VendorId& vendorId = s_vendorIds[ii];
|
||||
if (0 == bx::strncmp(vendorId.name, m_vendor, bx::strnlen(vendorId.name) ) )
|
||||
if (0 == bx::strncmp(vendorId.name, m_vendor, bx::strLen(vendorId.name) ) )
|
||||
{
|
||||
g_caps.vendorId = vendorId.id;
|
||||
break;
|
||||
@@ -1577,7 +1577,7 @@ namespace bgfx { namespace gl
|
||||
{
|
||||
char name[1024];
|
||||
const char* pos = extensions;
|
||||
const char* end = extensions + bx::strnlen(extensions);
|
||||
const char* end = extensions + bx::strLen(extensions);
|
||||
uint32_t index = 0;
|
||||
while (pos < end)
|
||||
{
|
||||
@@ -1589,10 +1589,10 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
else
|
||||
{
|
||||
len = bx::uint32_min(sizeof(name), (uint32_t)bx::strnlen(pos) );
|
||||
len = bx::uint32_min(sizeof(name), (uint32_t)bx::strLen(pos) );
|
||||
}
|
||||
|
||||
bx::strlncpy(name, BX_COUNTOF(name), pos, len);
|
||||
bx::strCopy(name, BX_COUNTOF(name), pos, len);
|
||||
name[len] = '\0';
|
||||
|
||||
updateExtension(name);
|
||||
@@ -2591,9 +2591,9 @@ namespace bgfx { namespace gl
|
||||
|
||||
void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE
|
||||
{
|
||||
bx::strlcpy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED]
|
||||
, _name
|
||||
bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED]
|
||||
, BX_COUNTOF(s_viewName[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED
|
||||
, _name
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5338,7 +5338,7 @@ namespace bgfx { namespace gl
|
||||
|
||||
void writeString(bx::WriterI* _writer, const char* _str)
|
||||
{
|
||||
bx::write(_writer, _str, (int32_t)bx::strnlen(_str) );
|
||||
bx::write(_writer, _str, (int32_t)bx::strLen(_str) );
|
||||
}
|
||||
|
||||
void writeStringf(bx::WriterI* _writer, const char* _format, ...)
|
||||
@@ -5355,8 +5355,8 @@ namespace bgfx { namespace gl
|
||||
|
||||
void strins(char* _str, const char* _insert)
|
||||
{
|
||||
size_t len = bx::strnlen(_insert);
|
||||
bx::memMove(&_str[len], _str, bx::strnlen(_str)+1);
|
||||
size_t len = bx::strLen(_insert);
|
||||
bx::memMove(&_str[len], _str, bx::strLen(_str)+1);
|
||||
bx::memCopy(_str, _insert, len);
|
||||
}
|
||||
|
||||
@@ -5426,7 +5426,7 @@ namespace bgfx { namespace gl
|
||||
{
|
||||
if (GL_COMPUTE_SHADER != m_type)
|
||||
{
|
||||
int32_t codeLen = (int32_t)bx::strnlen(code);
|
||||
int32_t codeLen = (int32_t)bx::strLen(code);
|
||||
int32_t tempLen = codeLen + (4<<10);
|
||||
char* temp = (char*)alloca(tempLen);
|
||||
bx::StaticMemoryBlockWriter writer(temp, tempLen);
|
||||
|
||||
Reference in New Issue
Block a user