Explicitly add signed/unsigned comparison to warnings
This commit is contained in:
parent
441dfa30f0
commit
d663be853f
|
@ -684,7 +684,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
|||
|
||||
std::vector<std::pair<const ZONE_CONTAINER*, PCB_LAYER_ID>> zones;
|
||||
|
||||
for( size_t i = 0; i < m_board->GetAreaCount(); i++ )
|
||||
for( int i = 0; i < m_board->GetAreaCount(); i++ )
|
||||
{
|
||||
const ZONE_CONTAINER* zone = m_board->GetArea( i );
|
||||
|
||||
|
|
|
@ -272,6 +272,9 @@ endif(USE_DISTCC)
|
|||
|
||||
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
|
||||
# Add additional warning flags to avoid signed/unsigned comparison
|
||||
set( CMAKE_CXX_FLAGS "-Wsign-compare" )
|
||||
|
||||
# Set 32-bit flag for GCC to prevent excess precision
|
||||
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set( CMAKE_CXX_FLAGS "-ffloat-store ${CMAKE_CXX_FLAGS}" )
|
||||
|
|
|
@ -892,11 +892,11 @@ public:
|
|||
|
||||
/**
|
||||
* Function GetAreaCount
|
||||
* @return int - The number of Areas or ZONE_CONTAINER.
|
||||
* @return The number of Areas or ZONE_CONTAINER.
|
||||
*/
|
||||
int GetAreaCount() const
|
||||
{
|
||||
return (int) m_ZoneDescriptorList.size();
|
||||
return static_cast<int>( m_ZoneDescriptorList.size() );
|
||||
}
|
||||
|
||||
/* Functions used in test, merge and cut outlines */
|
||||
|
|
Loading…
Reference in New Issue