Skip to content
Snippets Groups Projects
Commit 4ab43e5a authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Dropped useless (and problematic) operator== in HistoDef

parent d121a4b4
No related branches found
No related tags found
1 merge request!1490Fixed unsafe floating point comparisons
......@@ -88,10 +88,6 @@ namespace Gaudi {
// ========================================================================
/// ordering operator (to please BoundedVerifier)
friend bool operator<( const Histo1DDef& left, const Histo1DDef& right );
/// equality operator
friend bool operator==( const Histo1DDef& left, const Histo1DDef& right );
/// non-equality
friend bool operator!=( const Histo1DDef& left, const Histo1DDef& right );
// ========================================================================
/// the streamer operator for class Gaudi::Histo1DDef
friend std::ostream& operator<<( std::ostream& o, const Gaudi::Histo1DDef& histo );
......
......@@ -60,26 +60,6 @@ namespace Gaudi {
return std::tie( left.m_title, left.m_low, left.m_high, left.m_bins ) <
std::tie( right.m_title, right.m_low, right.m_high, right.m_bins );
}
// ============================================================================
// equality operator
// ============================================================================
#ifdef __ICC
// disable icc remark #1572: floating-point equality and inequality comparisons are unreliable
# pragma warning( push )
# pragma warning( disable : 1572 )
#endif
bool operator==( const Gaudi::Histo1DDef& left, const Gaudi::Histo1DDef& right ) {
return std::tie( left.m_title, left.m_low, left.m_high, left.m_bins ) ==
std::tie( right.m_title, right.m_low, right.m_high, right.m_bins );
}
#ifdef __ICC
// re-enable icc remark #1572
# pragma warning( pop )
#endif
// ============================================================================
// non-equality
// ============================================================================
bool operator!=( const Gaudi::Histo1DDef& left, const Gaudi::Histo1DDef& right ) { return !( left == right ); }
// ============================================================================
// the streamer operator for class Gaudi::Histo1DDef
// ============================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment