Return type not bool for checking if host supports "sizeWindow"

On this line:

unless the hostCallback is some sort of wrapper than translates the return values the hostOpcodeCanHostDo returns a type of VstInt32, not bool, so the following won’t work:

The return values are 0 = don’t know, -1 = no and 1 = yes, the above code will treat -1 like 1 since neither are zero so both will be cast to true for the bool. This may need to be updated to the following (if no translation of the values are done, which I can’t see happening anywhere):

A check throughout the code may be wise to check how from the return values from hostCallback are handled.

Yes, you’re right. I’ll fix this.

1 Like