Browse Source

Small optimizations in DRC and SHAPE_POLY_SET.

7.0
Alex 3 years ago
parent
commit
5e7c4b734c
  1. 4
      common/libeval_compiler/libeval_compiler.cpp
  2. 2
      libs/kimath/src/geometry/shape_poly_set.cpp
  3. 2
      pcbnew/drc/drc_engine.cpp

4
common/libeval_compiler/libeval_compiler.cpp

@ -2,7 +2,7 @@
* This file is part of libeval, a simple math expression evaluator
*
* Copyright (C) 2017 Michael Geselbracht, mgeselbracht3@gmail.com
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -124,7 +124,7 @@ bool VALUE::EqualTo( CONTEXT* aCtx, const VALUE* b ) const
if( b->m_stringIsWildcard )
return WildCompareString( b->AsString(), AsString(), false );
else
return !AsString().CmpNoCase( b->AsString() );
return AsString().IsSameAs( b->AsString(), false );
}
return false;

2
libs/kimath/src/geometry/shape_poly_set.cpp

@ -95,6 +95,8 @@ SHAPE_POLY_SET::SHAPE_POLY_SET( const SHAPE_POLY_SET& aOther ) :
{
if( aOther.IsTriangulationUpToDate() )
{
m_triangulatedPolys.reserve( aOther.TriangulatedPolyCount() );
for( unsigned i = 0; i < aOther.TriangulatedPolyCount(); i++ )
{
const TRIANGULATED_POLYGON* poly = aOther.TriangulatedPolygon( i );

2
pcbnew/drc/drc_engine.cpp

@ -1720,7 +1720,7 @@ int DRC_ENGINE::MatchDpSuffix( const wxString& aNetName, wxString& aComplementNe
if( rv != 0 && count >= 1 )
{
aBaseDpName = aNetName.Left( aNetName.Length() - count );
aComplementNet = aBaseDpName + aComplementNet + aNetName.Right( count - 1 );
aComplementNet = wxString( aBaseDpName ) << aComplementNet << aNetName.Right( count - 1 );
}
return rv;

Loading…
Cancel
Save