From 222017758cdc30efa7d979268a545a3d3228095f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 7 Feb 2014 20:54:58 +0100 Subject: [PATCH] Moved PCB_VISIBLE size check to .cpp. --- include/layers_id_colors_and_visibility.h | 12 ------------ pcbnew/class_board_design_settings.cpp | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 7dc0660457..5df67215be 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -245,18 +245,6 @@ enum PCB_VISIBLE END_PCB_VISIBLE_LIST // sentinel }; -#ifndef NDEBUG -struct static_check { - static_check() - { - // Long (the type used for saving visibility settings) is only 32 bits guaranteed, - // be sure that we do not cross the limit - assert( END_PCB_VISIBLE_LIST <= 32 ); - }; -}; -static static_check check; -#endif - /** * Enum NETNAMES_VISIBLE * is a set of layers specific for displaying net names. diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index e98dc81ef1..654ca11653 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -243,3 +243,16 @@ void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LAYER_MSK aMask ) // update m_CopperLayerCount to ensure its consistency with m_EnabledLayers m_CopperLayerCount = LayerMaskCountSet( aMask & ALL_CU_LAYERS); } + + +#ifndef NDEBUG +struct static_check { + static_check() + { + // Int (the type used for saving visibility settings) is only 32 bits guaranteed, + // be sure that we do not cross the limit + assert( END_PCB_VISIBLE_LIST <= 32 ); + }; +}; +static static_check check; +#endif