1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00

Added a template to allow the HeapBlock class to be given signed ints or other types that are not size_t for its size parameters

This commit is contained in:
jules 2017-10-11 12:10:58 +01:00
parent 13ccdf9411
commit 369d59f656
32 changed files with 189 additions and 199 deletions

View file

@ -247,7 +247,7 @@ bool CoreGraphicsContext::clipToRectangleListWithoutTest (const RectangleList<in
return false;
}
const size_t numRects = (size_t) clipRegion.getNumRectangles();
auto numRects = (size_t) clipRegion.getNumRectangles();
HeapBlock<CGRect> rects (numRects);
int i = 0;
@ -558,7 +558,7 @@ void CoreGraphicsContext::drawLine (const Line<float>& line)
void CoreGraphicsContext::fillRectList (const RectangleList<float>& list)
{
HeapBlock<CGRect> rects ((size_t) list.getNumRectangles());
HeapBlock<CGRect> rects (list.getNumRectangles());
size_t num = 0;

View file

@ -149,7 +149,7 @@ namespace CoreTextTypeLayout
{
if (advances == nullptr)
{
local.malloc ((size_t) numGlyphs);
local.malloc (numGlyphs);
CTRunGetAdvances (run, CFRangeMake (0, 0), local);
advances = local;
}