diff --git a/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp b/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp index 9f7cf1c113..cc14315173 100644 --- a/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp +++ b/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp @@ -228,24 +228,24 @@ private: const float xmargin = 3.0f; const float ymargin = 3.0f; - const float fontHeight = 0.4f * height; - const float deviceNameWidth = 0.6f * width; + const float fontHeight = 0.4f * (float) height; + const float deviceNameWidth = 0.6f * (float) width; g.setFont (fontHeight); g.setColour (getDeviceNameFontColour (device.connectionStatus)); g.drawText (device.name, - Rectangle (xmargin, ymargin, deviceNameWidth - (2.0f * xmargin), height - (2.0f * ymargin)), + Rectangle (xmargin, ymargin, deviceNameWidth - (2.0f * xmargin), (float) height - (2.0f * ymargin)), Justification::topLeft, true); g.setColour (getDeviceStatusFontColour (device.connectionStatus)); g.drawText (statusString, Rectangle (deviceNameWidth + xmargin, ymargin, - width - deviceNameWidth - (2.0f * xmargin), height - (2.0f * ymargin)), + (float) width - deviceNameWidth - (2.0f * xmargin), (float) height - (2.0f * ymargin)), Justification::topRight, true); g.setColour (Colours::grey); - g.drawHorizontalLine (height - 1, xmargin, width); + g.drawHorizontalLine (height - 1, xmargin, (float) width); } } diff --git a/modules/juce_core/memory/juce_AllocationHooks.cpp b/modules/juce_core/memory/juce_AllocationHooks.cpp index 3c6cb6b36d..b2d5ca2467 100644 --- a/modules/juce_core/memory/juce_AllocationHooks.cpp +++ b/modules/juce_core/memory/juce_AllocationHooks.cpp @@ -94,7 +94,7 @@ UnitTestAllocationChecker::UnitTestAllocationChecker (UnitTest& test) UnitTestAllocationChecker::~UnitTestAllocationChecker() noexcept { getAllocationHooksForThread().removeListener (this); - unitTest.expectEquals (calls, (size_t) 0, "new or delete was incorrectly called while allocation checker was active"); + unitTest.expectEquals ((int) calls, 0, "new or delete was incorrectly called while allocation checker was active"); } void UnitTestAllocationChecker::newOrDeleteCalled() noexcept { ++calls; } diff --git a/modules/juce_core/native/juce_android_SystemStats.cpp b/modules/juce_core/native/juce_android_SystemStats.cpp index 32248e0741..e9038a0e0c 100644 --- a/modules/juce_core/native/juce_android_SystemStats.cpp +++ b/modules/juce_core/native/juce_android_SystemStats.cpp @@ -229,7 +229,7 @@ int64 Time::getHighResolutionTicksPerSecond() noexcept double Time::getMillisecondCounterHiRes() noexcept { - return getHighResolutionTicks() * 0.001; + return (double) getHighResolutionTicks() * 0.001; } bool Time::setSystemTimeToThisTime() const diff --git a/modules/juce_graphics/native/juce_android_Fonts.cpp b/modules/juce_graphics/native/juce_android_Fonts.cpp index f6a2e0c027..ad187bc7c4 100644 --- a/modules/juce_graphics/native/juce_android_Fonts.cpp +++ b/modules/juce_graphics/native/juce_android_Fonts.cpp @@ -352,7 +352,7 @@ public: LocalRef bitmap (env->CallStaticObjectMethod (AndroidBitmap, AndroidBitmap.createBitmap, w, h, bitmapConfig.get())); LocalRef canvas (env->NewObject (AndroidCanvas, AndroidCanvas.create, bitmap.get())); - env->CallBooleanMethod (matrix.get(), AndroidMatrix.postTranslate, bounds.getX() * -1.0f, bounds.getY() * -1.0f); + env->CallBooleanMethod (matrix.get(), AndroidMatrix.postTranslate, (float) -bounds.getX(), (float) -bounds.getY()); env->CallVoidMethod (canvas.get(), AndroidCanvas.setMatrix, matrix.get()); env->CallVoidMethod (canvas.get(), AndroidCanvas.drawPath, path.get(), paint.get()); diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 67294b177b..4f213790c5 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -581,8 +581,8 @@ public: return isPositiveAndBelow (localPos.x, component.getWidth()) && isPositiveAndBelow (localPos.y, component.getHeight()) && ((! trueIfInAChildWindow) || view.callBooleanMethod (ComponentPeerView.containsPoint, - localPos.x * scale, - localPos.y * scale)); + (float) localPos.x * scale, + (float) localPos.y * scale)); } BorderSize getFrameSize() const override diff --git a/modules/juce_video/native/juce_android_Video.h b/modules/juce_video/native/juce_android_Video.h index 925eb9efa2..42c0bc00d0 100644 --- a/modules/juce_video/native/juce_android_Video.h +++ b/modules/juce_video/native/juce_android_Video.h @@ -544,7 +544,7 @@ private: double getSpeed() const { return controller.getPlaySpeed(); } Rectangle getNativeSize() const { return player.getVideoNativeSize(); } - double getDuration() const { return player.getVideoDuration() / 1000.0; } + double getDuration() const { return (double) player.getVideoDuration() / 1000.0; } void setVolume (float newVolume) { @@ -578,7 +578,7 @@ private: auto* env = getEnv(); auto pos = env->CallLongMethod (storedPlaybackState, AndroidPlaybackState.getPosition); - setPosition (pos / 1000.0); + setPosition ((double) pos / 1000.0); setSpeed (playSpeedMult); @@ -680,7 +680,7 @@ private: auto playbackState = LocalRef (env->CallObjectMethod (nativeController, AndroidMediaController.getPlaybackState)); if (playbackState != nullptr) - return env->CallLongMethod (playbackState, AndroidPlaybackState.getPosition) / 1000.0; + return (double) env->CallLongMethod (playbackState, AndroidPlaybackState.getPosition) / 1000.0; return 0.0; } @@ -705,7 +705,7 @@ private: auto maxVolume = env->CallIntMethod (playbackInfo, AndroidMediaControllerPlaybackInfo.getMaxVolume); - auto targetVolume = jmin (jint (maxVolume * newVolume), maxVolume); + auto targetVolume = jmin (jint ((float) maxVolume * newVolume), maxVolume); static constexpr jint flagShowUI = 1; env->CallVoidMethod (nativeController, AndroidMediaController.setVolumeTo, targetVolume, flagShowUI); @@ -720,7 +720,7 @@ private: auto maxVolume = (int) (env->CallIntMethod (playbackInfo, AndroidMediaControllerPlaybackInfo.getMaxVolume)); auto curVolume = (int) (env->CallIntMethod (playbackInfo, AndroidMediaControllerPlaybackInfo.getCurrentVolume)); - return static_cast (curVolume) / maxVolume; + return static_cast (curVolume) / (float) maxVolume; } private: