laurentlb / shader-minifier

Minify and obfuscate GLSL or HLSL code

Home Page:https://ctrl-alt-test.fr/minifier/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use comma operator with for-initializer

therontarigo opened this issue · comments

Input:

  int a,b,c;
  if(cond) {
    a=0,b=1;
    for (c=2;c<3;c++) ;
  }

Output:

  int a,b,c;
  if(cond)
    {
      a=0,b=1;
      for(c=2;c<3;c++)
        ;
    }

Expected:

  int a,b,c;
  if(cond)
    for(a=0,b=1,c=2;c<3;c++)
      ;