mojoshader_compiler.c
changeset 982 97d3ff546b26
parent 981 bfcdebd39e5b
child 983 665e2d8bd7de
equal deleted inserted replaced
981:bfcdebd39e5b 982:97d3ff546b26
  2206         // !!! FIXME: this needs to find functions that implicit casts would catch:
  2206         // !!! FIXME: this needs to find functions that implicit casts would catch:
  2207         //          void fn(int x);
  2207         //          void fn(int x);
  2208         //          needs to match:
  2208         //          needs to match:
  2209         //          short q = 2; fn(q);
  2209         //          short q = 2; fn(q);
  2210         const MOJOSHADER_astDataTypeFunction *dtfn = (MOJOSHADER_astDataTypeFunction *) dt;
  2210         const MOJOSHADER_astDataTypeFunction *dtfn = (MOJOSHADER_astDataTypeFunction *) dt;
  2211         args = ast->args;
       
  2212         int match = 1;
  2211         int match = 1;
  2213         int i;
  2212         int i;
  2214 
  2213 
  2215         if (argcount != dtfn->num_params)  // !!! FIXME: default args.
  2214         if (argcount != dtfn->num_params)  // !!! FIXME: default args.
  2216             match = 0;
  2215             match = 0;
  2217         else
  2216         else
  2218         {
  2217         {
       
  2218             args = ast->args;
  2219             for (i = 0; i < argcount; i++)
  2219             for (i = 0; i < argcount; i++)
  2220             {
  2220             {
  2221                 assert(args != NULL);
  2221                 assert(args != NULL);
  2222                 dt = args->argument->datatype;
  2222                 dt = args->argument->datatype;
  2223                 args = args->next;
  2223                 args = args->next;