Skip to content

Commit

Permalink
Add void return for hxsl setParamIndexValue and setParamFloatValue (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lbergman committed Feb 17, 2023
1 parent 6946044 commit a0f50fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hxsl/Macros.hx
Expand Up @@ -314,6 +314,7 @@ class Macros {
name : "setParamIndexValue",
pos : pos,
kind : FFun( {
ret : macro : Void,
args : [ { name : "index", type : macro : Int }, { name : "val", type : macro : Dynamic } ],
expr : {
expr : ESwitch(macro index, [for( p in eparams ) { values : [macro $v{ index++ } ], expr : macro $p = val } ], macro {}),
Expand All @@ -326,6 +327,7 @@ class Macros {
name : "setParamIndexFloatValue",
pos : pos,
kind : FFun( {
ret : macro : Void,
args : [ { name : "index", type : macro : Int }, { name : "val", type : macro : Float } ],
expr : {
expr : ESwitch(macro index, [for( i in 0...tparams.length ) if( tparams[i] == TFloat ) { values : [macro $v{i}], expr : macro ${eparams[i]} = val }], macro {}),
Expand Down

0 comments on commit a0f50fa

Please sign in to comment.