diff --git a/common/string_utils.cpp b/common/string_utils.cpp index ece42491a8..5030176dc1 100644 --- a/common/string_utils.cpp +++ b/common/string_utils.cpp @@ -590,8 +590,6 @@ wxString EscapeHTML( const wxString& aString ) wxString UnescapeHTML( const wxString& aString ) { - wxString converted = aString; - // clang-format off static const std::map c_replacements = { { wxS( "quot" ), wxS( "\"" ) }, @@ -617,7 +615,7 @@ wxString UnescapeHTML( const wxString& aString ) size_t len = 0; wxString result; - wxString str = converted; + wxString str = aString; while( regex.Matches( str ) ) { diff --git a/eeschema/sim/kibis/kibis.cpp b/eeschema/sim/kibis/kibis.cpp index f0b683f77a..236e6a8d16 100644 --- a/eeschema/sim/kibis/kibis.cpp +++ b/eeschema/sim/kibis/kibis.cpp @@ -730,9 +730,9 @@ void KIBIS_PIN::getKuKdFromFile( const std::string& aSimul ) Report( _( "Cannot remove temporary output file" ), RPT_SEVERITY_WARNING ); } - m_Ku = ku; - m_Kd = kd; - m_t = t; + m_Ku = std::move( ku ); + m_Kd = std::move( kd ); + m_t = std::move( t ); } @@ -831,9 +831,9 @@ void KIBIS_PIN::getKuKdOneWaveform( KIBIS_MODEL& ku.push_back( 0 ); kd.push_back( 0 ); t.push_back( 0 ); - m_Ku = ku; - m_Kd = kd; - m_t = t; + m_Ku = std::move( ku ); + m_Kd = std::move( kd ); + m_t = std::move( t ); } else { @@ -978,9 +978,9 @@ void KIBIS_PIN::getKuKdNoWaveform( KIBIS_MODEL& aModel, const KIBIS_PARAMETER& a t.push_back( 0 ); } - m_Ku = ku; - m_Kd = kd; - m_t = t; + m_Ku = std::move( ku ); + m_Kd = std::move( kd ); + m_t = std::move( t ); } @@ -1003,9 +1003,9 @@ void KIBIS_PIN::getKuKdTwoWaveforms( KIBIS_MODEL& ku.push_back( 0 ); kd.push_back( 0 ); t.push_back( 0 ); - m_Ku = ku; - m_Kd = kd; - m_t = t; + m_Ku = std::move( ku ); + m_Kd = std::move( kd ); + m_t = std::move( t ); } else { diff --git a/libs/kimath/src/geometry/shape_poly_set.cpp b/libs/kimath/src/geometry/shape_poly_set.cpp index da7d6b54db..3c8b6055e6 100644 --- a/libs/kimath/src/geometry/shape_poly_set.cpp +++ b/libs/kimath/src/geometry/shape_poly_set.cpp @@ -1999,7 +1999,7 @@ bool SHAPE_POLY_SET::Parse( std::stringstream& aStream ) paths.push_back( std::move( outline ) ); } - m_polys.push_back( paths ); + m_polys.push_back( std::move( paths ) ); } return true; diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index d8442e4421..ecf000b218 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -257,7 +257,7 @@ bool WALKAROUND::singleStep() if ( anyColliding ) { - shortest = shortest_alt; + shortest = std::move( shortest_alt ); } if( !shortest )