7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 14:50:11 +00:00

Allow SWIG access to lset

SWIG doesn't like initializer lists because they are compile-time
objects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19326
This commit is contained in:
Seth Hillbrand 2024-12-19 12:01:15 -08:00
parent ecc83221a1
commit c2bfdaa6ae
2 changed files with 12 additions and 0 deletions
common
include

View File

@ -51,6 +51,16 @@ LSET::LSET( std::initializer_list<PCB_LAYER_ID> aList ) :
}
}
LSET::LSET( const std::vector<PCB_LAYER_ID>& aList ) :
LSET()
{
for( PCB_LAYER_ID layer : aList )
{
if( layer >= 0 )
set( layer );
}
}
LSET::LSET( const LSEQ& aSeq ) :
LSET()

View File

@ -45,6 +45,8 @@ public:
LSET( std::initializer_list<PCB_LAYER_ID> aList );
LSET( const std::vector<PCB_LAYER_ID>& aList );
LSET( const LSEQ& aSeq );
LSET( const LAYER_RANGE& aRange );