Fix compile errors on non-GCC compilers.
Fixes: lp:1782148 * https://bugs.launchpad.net/kicad/+bug/1782148 (cherry picked from commit 2ada8fa)
This commit is contained in:
parent
e6b55c9ae5
commit
65d72e1c11
|
@ -30,7 +30,7 @@ void WX_GRID::SetTable( wxGridTableBase* aTable )
|
||||||
{
|
{
|
||||||
// wxGrid::SetTable() messes up the column widths from wxFormBuilder so we have to save
|
// wxGrid::SetTable() messes up the column widths from wxFormBuilder so we have to save
|
||||||
// and restore them.
|
// and restore them.
|
||||||
int formBuilderColWidths[ GetNumberCols() ];
|
int* formBuilderColWidths = new int[ GetNumberCols() ];
|
||||||
|
|
||||||
for( int i = 0; i < GetNumberCols(); ++i )
|
for( int i = 0; i < GetNumberCols(); ++i )
|
||||||
formBuilderColWidths[ i ] = GetColSize( i );
|
formBuilderColWidths[ i ] = GetColSize( i );
|
||||||
|
@ -39,6 +39,8 @@ void WX_GRID::SetTable( wxGridTableBase* aTable )
|
||||||
|
|
||||||
for( int i = 0; i < GetNumberCols(); ++i )
|
for( int i = 0; i < GetNumberCols(); ++i )
|
||||||
SetColSize( i, formBuilderColWidths[ i ] );
|
SetColSize( i, formBuilderColWidths[ i ] );
|
||||||
|
|
||||||
|
delete[] formBuilderColWidths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue