juce_VSTPluginFormat.cpp warning

vstSupportsBypass = pluginCanDo ("bypass");

generates a warning C4800: ‘int’: forcing value to bool ‘true’ or ‘false’ (performance warning)

cast the value to a bool.

vstSupportsBypass = (pluginCanDo ("bypass") == 1);


Thanks, I’ll get that sorted.

When converting an int to a bool, it’s a good idea to get into the habit of using != 0 rather than == 1 :slight_smile:

(oh, whoops… to clarify: pretty much the only time my comment above isn’t true is when you’re dealing with VST canDo return values, which are actually tri-state… I should read posts more thoroughly before replying!)

In the tip… line 3079 should be:

 pluginRespondsToDPIChanges = plugin.pluginCanDo ("supportsViewDpiScaling") > 0;