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

Fix build on GCC 14.1.1.

This commit is contained in:
Alex Shvartzkop 2024-07-15 13:38:34 +03:00
parent 349f3cc064
commit 77eb197a21
3 changed files with 15 additions and 10 deletions

View File

@ -20,4 +20,17 @@
#include <layer_ids.h>
#include <lseq.h>
#include <algorithm>
#include <vector>
int LSEQ::TestLayers( PCB_LAYER_ID aRhs, PCB_LAYER_ID aLhs ) const
{
if( aRhs == aLhs )
return 0;
auto itRhs = std::find( begin(), end(), aRhs );
auto itLhs = std::find( begin(), end(), aLhs );
return std::distance( itRhs, itLhs );
}

View File

@ -22,6 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <algorithm>
#include <bitset> // for bitset, __bitset<>::ref...
#include <cassert>
#include <cstdarg>

View File

@ -70,16 +70,7 @@ public:
return at( m_index ); // throws std::out_of_range
}
int TestLayers( PCB_LAYER_ID aRhs, PCB_LAYER_ID aLhs ) const
{
if( aRhs == aLhs )
return 0;
auto itRhs = std::find( begin(), end(), aRhs );
auto itLhs = std::find( begin(), end(), aLhs );
return std::distance( itRhs, itLhs );
}
int TestLayers( PCB_LAYER_ID aRhs, PCB_LAYER_ID aLhs ) const;
};