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:
Jeff Young 2018-07-17 07:53:24 +01:00
parent e6b55c9ae5
commit 65d72e1c11
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,7 @@ void WX_GRID::SetTable( wxGridTableBase* aTable )
{
// wxGrid::SetTable() messes up the column widths from wxFormBuilder so we have to save
// and restore them.
int formBuilderColWidths[ GetNumberCols() ];
int* formBuilderColWidths = new int[ GetNumberCols() ];
for( int i = 0; i < GetNumberCols(); ++i )
formBuilderColWidths[ i ] = GetColSize( i );
@ -39,6 +39,8 @@ void WX_GRID::SetTable( wxGridTableBase* aTable )
for( int i = 0; i < GetNumberCols(); ++i )
SetColSize( i, formBuilderColWidths[ i ] );
delete[] formBuilderColWidths;
}