From bee48890cbdec8c2a842f5f557e351804a7eb00c Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Tue, 10 Oct 2023 19:30:07 +0800 Subject: [PATCH] optimized codes of MaterialFileLoader.cpp --- src/ShaderGen/MaterialFileLoader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ShaderGen/MaterialFileLoader.cpp b/src/ShaderGen/MaterialFileLoader.cpp index 77dfa884..787edd44 100644 --- a/src/ShaderGen/MaterialFileLoader.cpp +++ b/src/ShaderGen/MaterialFileLoader.cpp @@ -77,6 +77,10 @@ namespace if(!text||!*text||len<=0) return(false); + if(hgl::stricmp(text,"Require ",8)==0) + { + } + return(true); } };//struct MaterialBlockParse @@ -159,7 +163,7 @@ namespace code=true; } else - if(hgl::stricmp(text,"Length",6)==0) + if(hgl::stricmp(text,"Length ",7)==0) { text+=7; while(*text==' '||*text=='\t')++text; @@ -167,7 +171,7 @@ namespace hgl::stou(text,mi_bytes); } else - if(hgl::stricmp(text,"Stage",5)==0) + if(hgl::stricmp(text,"Stage ",6)==0) { const char *ep=text+len; const char *sp;