Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4fe4794

Browse files
committed
smallish optimize
1 parent af1bcf1 commit 4fe4794

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tiny_obj_loader.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,11 @@ static bool ParseTextureNameAndOption(std::string *texname,
11651165
token += strspn(token, " \t"); // skip space
11661166

11671167
a_tok = token2tok(token);
1168-
1168+
1169+
1170+
//tigra: minimize checks
1171+
if(a_tok>=TOK_blendu && a_tok<=TOK_mm)
1172+
{
11691173
//if ((0 == strncmp(token, "-blendu", 7)) && IS_SPACE((token[7])))
11701174
if (a_tok == TOK_blendu)
11711175
{
@@ -1240,6 +1244,8 @@ static bool ParseTextureNameAndOption(std::string *texname,
12401244
token += 4;
12411245
parseReal2(&(texopt->brightness), &(texopt->contrast), &token, 0.0, 1.0);
12421246
}
1247+
1248+
}
12431249
else {
12441250
// Assume texture filename
12451251
#if 0

0 commit comments

Comments
 (0)