Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Dec 10, 2017
1 parent f53a43e commit f9d39b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions tools/shaderc/shaderc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ namespace bgfx
|| 0 == bx::strCmp(typen, "highp", 5) )
{
precision = typen;
typen = parse = bx::strws(bx::strword(parse) );
typen = parse = bx::strws(bx::strSkipWord(parse) );
}

if (0 == bx::strCmp(typen, "flat", 4)
Expand All @@ -1061,13 +1061,13 @@ namespace bgfx
|| 0 == bx::strCmp(typen, "centroid", 8) )
{
interpolation = typen;
typen = parse = bx::strws(bx::strword(parse) );
typen = parse = bx::strws(bx::strSkipWord(parse) );
}

const char* name = parse = bx::strws(bx::strword(parse) );
const char* column = parse = bx::strws(bx::strword(parse) );
const char* name = parse = bx::strws(bx::strSkipWord(parse) );
const char* column = parse = bx::strws(bx::strSkipWord(parse) );
const char* semantics = parse = bx::strws( (*parse == ':' ? ++parse : parse) );
const char* assign = parse = bx::strws(bx::strword(parse) );
const char* assign = parse = bx::strws(bx::strSkipWord(parse) );
const char* init = parse = bx::strws( (*parse == '=' ? ++parse : parse) );

if (typen < eol
Expand All @@ -1079,17 +1079,17 @@ namespace bgfx
Varying var;
if (NULL != precision)
{
var.m_precision.assign(precision, bx::strword(precision)-precision);
var.m_precision.assign(precision, bx::strSkipWord(precision)-precision);
}

if (NULL != interpolation)
{
var.m_interpolation.assign(interpolation, bx::strword(interpolation)-interpolation);
var.m_interpolation.assign(interpolation, bx::strSkipWord(interpolation)-interpolation);
}

var.m_type.assign(typen, bx::strword(typen)-typen);
var.m_name.assign(name, bx::strword(name)-name);
var.m_semantics.assign(semantics, bx::strword(semantics)-semantics);
var.m_type.assign(typen, bx::strSkipWord(typen)-typen);
var.m_name.assign(name, bx::strSkipWord(name)-name);
var.m_semantics.assign(semantics, bx::strSkipWord(semantics)-semantics);

if (d3d == 9
&& var.m_semantics == "BITANGENT")
Expand Down
8 changes: 4 additions & 4 deletions tools/shaderc/shaderc_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace bgfx { namespace glsl
if (NULL != eol)
{
const char* qualifier = parse;
parse = bx::strws(bx::strword(parse) );
parse = bx::strws(bx::strSkipWord(parse) );

if (0 == bx::strCmp(qualifier, "attribute", 9)
|| 0 == bx::strCmp(qualifier, "varying", 7)
Expand Down Expand Up @@ -148,13 +148,13 @@ namespace bgfx { namespace glsl
|| 0 == bx::strCmp(typen, "highp", 5) )
{
precision = typen;
typen = parse = bx::strws(bx::strword(parse) );
typen = parse = bx::strws(bx::strSkipWord(parse) );
}

BX_UNUSED(precision);

char uniformType[256];
parse = bx::strword(parse);
parse = bx::strSkipWord(parse);

if (0 == bx::strCmp(typen, "sampler", 7) )
{
Expand Down Expand Up @@ -222,7 +222,7 @@ namespace bgfx { namespace glsl
const char* typen = parse;

char uniformType[256];
parse = bx::strword(parse);
parse = bx::strSkipWord(parse);
bx::strCopy(uniformType, int32_t(parse-typen+1), typen);
const char* name = parse = bx::strws(parse);

Expand Down

0 comments on commit f9d39b2

Please sign in to comment.