Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #1319

Closed
wants to merge 4 commits into from
Closed

merge #1319

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/juce_core/native/juce_SystemStats_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static String getLocaleValue (CFStringRef key)
}

highResTimerFrequency = (timebase.denom * (uint64) 1000000000) / timebase.numer;
highResTimerToMillisecRatio = hiResCounterNumerator / (double) hiResCounterDenominator;
highResTimerToMillisecRatio = static_cast<double>(hiResCounterNumerator) / (double) hiResCounterDenominator;
}

uint32 millisecondsSinceStartup() const noexcept
Expand All @@ -321,7 +321,7 @@ uint32 millisecondsSinceStartup() const noexcept

double getMillisecondCounterHiRes() const noexcept
{
return mach_absolute_time() * highResTimerToMillisecRatio;
return static_cast<double>(mach_absolute_time()) * highResTimerToMillisecRatio;
}

int64 highResTimerFrequency;
Expand Down
4 changes: 2 additions & 2 deletions modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static CGBitmapInfo getCGImageFlags (const Image::PixelFormat& format)
auto image = detail::ImagePtr { CoreGraphicsPixelData::createImage (singleChannelImage, greyColourSpace.get()) };

flip();
auto t = AffineTransform::verticalFlip (sourceImage.getHeight()).followedBy (transform);
auto t = AffineTransform::verticalFlip (static_cast<float>(sourceImage.getHeight())).followedBy (transform);
applyTransform (t);

auto r = convertToCGRect (sourceImage.getBounds());
Expand Down Expand Up @@ -531,7 +531,7 @@ static CGBitmapInfo getCGImageFlags (const Image::PixelFormat& format)
CGContextSetAlpha (context.get(), state->fillType.getOpacity());

flip();
applyTransform (AffineTransform::verticalFlip (ih).followedBy (transform));
applyTransform (AffineTransform::verticalFlip (static_cast<float>(ih)).followedBy (transform));
auto imageRect = CGRectMake (0, 0, iw, ih);

if (fillEntireClipAsTiles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class CoreGraphicsMetalLayerRenderer

if (alignedSize > size)
{
size = std::max (alignedSize, alignTo ((size_t) (size * growthFactor), pagesize));
size = std::max (alignedSize, alignTo ((size_t) (static_cast<float>(size) * growthFactor), pagesize));
allocation = std::make_unique<AllocationWrapper> (pagesize, size);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,8 @@ void renderRect (CGContextRef cg, NSRect r, float displayScale)
if (! clip.isEmpty())
{
Image temp (component.isOpaque() ? Image::RGB : Image::ARGB,
roundToInt (clipW * displayScale),
roundToInt (clipH * displayScale),
roundToInt (static_cast<float>(clipW) * displayScale),
roundToInt (static_cast<float>(clipH) * displayScale),
! component.isOpaque());

{
Expand Down
Loading