Concering the == operator: maybe open a separate ticket for this
discussion?

On 17 February 2014 17:35, mcmenace <notifications@github.com> wrote:

> In src/openms/source/METADATA/ChromatogramSettings.cpp:
>
> > @@ -106,7 +107,12 @@
> >             source_file_ == rhs.source_file_ &&
> >             precursor_ == rhs.precursor_ &&
> >             product_ == rhs.product_ &&
> > -           data_processing_ == rhs.data_processing_ &&
> > +           // We are not interested whether the pointers are equal but whether
> > +           // the contents are equal
> > +           ( data_processing_.size() == rhs.data_processing_.size() &&
> > +           std::equal( boost::make_indirect_iterator(data_processing_.begin()),
> > +                       boost::make_indirect_iterator(data_processing_.end()),
> > +                       boost::make_indirect_iterator(rhs.data_processing_.begin()) ) ) &&
>
> True, in comparison to before it did neither increase nor decrease.
>
> As I said, it is totally correct to compare the content but as a style or
> design decision we should discuss in general if we want to keep the
> expensive comparison as operator== or as a function. Here I think it is not
> too critical, but I have seen other portions of OpenMS where a call to
> operator== triggers a huge comparison calculation. I would vote for
> anything trigger a 'calculation' to be moved in a function, even if
> operator== will than disappear.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/OpenMS/OpenMS/pull/695/files#r9797154>
> .
>