From 8757fcf676bdc4bbcd610be42b5684e0afa697ab Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 4 Dec 2018 08:00:43 -0700 Subject: [PATCH] Add array hint to wxArrayString contructors This may be required for some compilers to prevent premature casting to a single element. --- pcbnew/import_gfx/dxf_import_plugin.h | 3 ++- pcbnew/import_gfx/svg_import_plugin.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/import_gfx/dxf_import_plugin.h b/pcbnew/import_gfx/dxf_import_plugin.h index 9759d82954..bd698caa99 100644 --- a/pcbnew/import_gfx/dxf_import_plugin.h +++ b/pcbnew/import_gfx/dxf_import_plugin.h @@ -145,7 +145,8 @@ public: const wxArrayString GetFileExtensions() const override { - return wxArrayString( 1, { "dxf" } ); + // N.B. The extra "" hints for some compilers that the array should not be optimized out + return wxArrayString( 1, { "dxf", "" } ); } bool Load( const wxString& aFileName ) override; diff --git a/pcbnew/import_gfx/svg_import_plugin.h b/pcbnew/import_gfx/svg_import_plugin.h index 464c81fb3b..c9e05f7558 100644 --- a/pcbnew/import_gfx/svg_import_plugin.h +++ b/pcbnew/import_gfx/svg_import_plugin.h @@ -44,7 +44,8 @@ public: const wxArrayString GetFileExtensions() const override { - return wxArrayString( 1, { "svg" } ); + // N.B. The extra "" hints for some compilers that the array should not be optimized out + return wxArrayString( 1, { "svg", "" } ); } /**