Browse Source

VST2: Fix conversion warnings on Linux

tags/2021-05-28
reuk Tom Poole 5 years ago
parent
commit
df3b49fbd3
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 7
- 7
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -178,7 +178,7 @@ namespace
#elif JUCE_LINUX || JUCE_IOS || JUCE_ANDROID #elif JUCE_LINUX || JUCE_IOS || JUCE_ANDROID
timeval micro; timeval micro;
gettimeofday (&micro, nullptr); gettimeofday (&micro, nullptr);
return micro.tv_usec * 1000.0;
return (double) micro.tv_usec * 1000.0;
#elif JUCE_MAC #elif JUCE_MAC
UnsignedWide micro; UnsignedWide micro;
Microseconds (&micro); Microseconds (&micro);
@@ -446,8 +446,8 @@ private:
} }
else else
{ {
entry->range.low = curEntry / (float) numEntries;
entry->range.high = (curEntry + 1) / (float) numEntries;
entry->range.low = (float) curEntry / (float) numEntries;
entry->range.high = (float) (curEntry + 1) / (float) numEntries;
entry->range.inclusiveLow = true; entry->range.inclusiveLow = true;
entry->range.inclusiveHigh = (curEntry == numEntries - 1); entry->range.inclusiveHigh = (curEntry == numEntries - 1);
@@ -2878,8 +2878,8 @@ public:
{ {
X11Symbols::getInstance()->xMoveResizeWindow (display, pluginWindow, X11Symbols::getInstance()->xMoveResizeWindow (display, pluginWindow,
pos.getX(), pos.getY(), pos.getX(), pos.getY(),
static_cast<unsigned int> (roundToInt (getWidth() * nativeScaleFactor)),
static_cast<unsigned int> (roundToInt (getHeight() * nativeScaleFactor)));
static_cast<unsigned int> (roundToInt ((float) getWidth() * nativeScaleFactor)),
static_cast<unsigned int> (roundToInt ((float) getHeight() * nativeScaleFactor)));
X11Symbols::getInstance()->xMapRaised (display, pluginWindow); X11Symbols::getInstance()->xMapRaised (display, pluginWindow);
X11Symbols::getInstance()->xFlush (display); X11Symbols::getInstance()->xFlush (display);
@@ -3170,8 +3170,8 @@ private:
X11Symbols::getInstance()->xMapRaised (display, pluginWindow); X11Symbols::getInstance()->xMapRaised (display, pluginWindow);
#endif #endif
w = roundToInt (w / nativeScaleFactor);
h = roundToInt (h / nativeScaleFactor);
w = roundToInt ((float) w / nativeScaleFactor);
h = roundToInt ((float) h / nativeScaleFactor);
// double-check it's not too tiny // double-check it's not too tiny
w = jmax (w, 32); w = jmax (w, 32);


Loading…
Cancel
Save