mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
remove unnecessary alloca
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
|
||||
const CGFloat totalRowHeight = [self rowHeight] + [self intercellSpacing].height;
|
||||
|
||||
NSRect * gridRects = (NSRect *)alloca(sizeof(NSRect) * (ceil(visibleRect.size.height / totalRowHeight) / 2));
|
||||
NSRect gridRects[(NSInteger)(ceil(visibleRect.size.height / totalRowHeight) / 2)];
|
||||
NSInteger rectNum = 0;
|
||||
|
||||
if (rows.length > 0)
|
||||
@@ -93,6 +93,7 @@
|
||||
visibleRect.size.height = totalRowHeight;
|
||||
if (start)
|
||||
visibleRect.origin.y += totalRowHeight;
|
||||
|
||||
for (NSInteger i = start ? 1 : 0; i < numberBlankRows; i += 2)
|
||||
{
|
||||
gridRects[rectNum++] = visibleRect;
|
||||
|
||||
Reference in New Issue
Block a user