Replace custom Clamp with std::clamp
Fixes bug in parser that had the elements in the wrong order due to our custom version not matching the standard order
This commit is contained in:
+2
-3
@@ -27,10 +27,9 @@
|
||||
#include <cassert>
|
||||
#include <cstdarg>
|
||||
#include <iostream> // for string, endl, basic_ost...
|
||||
#include <stddef.h> // for size_t
|
||||
#include <cstddef> // for size_t
|
||||
|
||||
#include <core/arraydim.h>
|
||||
#include <math/util.h> // for Clamp
|
||||
#include <layer_ids.h> // for PCB_LAYER_ID
|
||||
#include <lseq.h>
|
||||
#include <macros.h> // for arrayDim
|
||||
@@ -742,7 +741,7 @@ LSET LSET::AllCuMask( int aCuLayerCount )
|
||||
LSET ret = all;
|
||||
int clear_count = MAX_CU_LAYERS - aCuLayerCount;
|
||||
|
||||
clear_count = Clamp( 0, clear_count, MAX_CU_LAYERS - 2 );
|
||||
clear_count = std::clamp( clear_count, 0, MAX_CU_LAYERS - 2 );
|
||||
|
||||
for( int elem = In30_Cu; clear_count; --elem, --clear_count )
|
||||
ret.set( elem, false );
|
||||
|
||||
Reference in New Issue
Block a user