7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-04 23:05:30 +00:00

Fix a few Coverity issues.

This commit is contained in:
Wayne Stambaugh 2023-04-06 08:48:02 -04:00
parent 7eb13c3d33
commit b05de51a8d
3 changed files with 9 additions and 21 deletions

View File

@ -423,12 +423,8 @@ struct std::hash<EDA_TEXT>
{
std::size_t operator()( const EDA_TEXT& aText ) const
{
std::size_t seed;
hash_combine( seed, aText.GetText(), aText.GetAttributes(), aText.GetTextPos().x,
aText.GetTextPos().y );
return seed;
return hash_val( aText.GetText(), aText.GetAttributes(), aText.GetTextPos().x,
aText.GetTextPos().y );
}
};

View File

@ -97,16 +97,12 @@ struct std::hash<TEXT_ATTRIBUTES>
{
std::size_t operator()( const TEXT_ATTRIBUTES& aAttributes ) const
{
std::size_t seed;
hash_combine( seed, aAttributes.m_Font, aAttributes.m_Halign, aAttributes.m_Valign,
aAttributes.m_Angle.AsDegrees(), aAttributes.m_LineSpacing,
aAttributes.m_StrokeWidth, aAttributes.m_Italic, aAttributes.m_Bold,
aAttributes.m_Underlined, aAttributes.m_Color, aAttributes.m_Visible,
aAttributes.m_Mirrored, aAttributes.m_Multiline, aAttributes.m_Size.x,
aAttributes.m_Size.y );
return seed;
return hash_val( aAttributes.m_Font, aAttributes.m_Halign, aAttributes.m_Valign,
aAttributes.m_Angle.AsDegrees(), aAttributes.m_LineSpacing,
aAttributes.m_StrokeWidth, aAttributes.m_Italic, aAttributes.m_Bold,
aAttributes.m_Underlined, aAttributes.m_Color, aAttributes.m_Visible,
aAttributes.m_Mirrored, aAttributes.m_Multiline, aAttributes.m_Size.x,
aAttributes.m_Size.y );
}
};

View File

@ -441,11 +441,7 @@ struct std::hash<KIGFX::COLOR4D>
{
std::size_t operator()( const KIGFX::COLOR4D& aColor ) const
{
std::size_t seed;
hash_combine( seed, aColor.r, aColor.b, aColor.g, aColor.a );
return seed;
return hash_val( aColor.r, aColor.b, aColor.g, aColor.a );
}
};