Replaced strmb with strFindBlock.

This commit is contained in:
Branimir Karadžić 2018-10-28 16:58:46 -07:00
parent 3794494d3b
commit 1def5343e6
2 changed files with 5 additions and 5 deletions

View File

@ -5463,8 +5463,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
bx::StringView brace = bx::strFind(entry, "{");
if (!brace.isEmpty() )
{
const char* end = bx::strmb(brace.getPtr(), '{', '}');
if (NULL != end)
bx::StringView block = bx::strFindBlock(bx::StringView(brace.getPtr(), shader.getTerm() ), '{', '}');
if (!block.isEmpty() )
{
strins(const_cast<char*>(brace.getPtr()+1), "\n float bgfx_FragDepth = 0.0;\n");
}

View File

@ -1686,10 +1686,10 @@ namespace bgfx
bx::StringView brace = bx::strFind(bx::StringView(entry.getPtr(), shader.getTerm() ), "{");
if (!brace.isEmpty() )
{
const char* end = bx::strmb(brace.getPtr(), '{', '}');
if (NULL != end)
bx::StringView block = bx::strFindBlock(bx::StringView(brace.getPtr(), shader.getTerm() ), '{', '}');
if (!block.isEmpty() )
{
strInsert(const_cast<char*>(end), "__RETURN__;\n");
strInsert(const_cast<char*>(block.getTerm() ), "__RETURN__;\n");
}
}