xLnt. rich_text operator less fixed.

This commit is contained in:
Andrii Tkachenko 2018-02-08 09:51:50 +01:00
parent 3246d602c2
commit cb55735644

View File

@ -87,12 +87,9 @@ void rich_text::add_run(const rich_text_run &t)
bool rich_text::operator<(const rich_text &rhs) const bool rich_text::operator<(const rich_text &rhs) const
{ {
if (runs_.size() < rhs.runs_.size()) if (runs_.size() != rhs.runs_.size())
return true; return runs_.size() < rhs.runs_.size();
if (runs_.size() > rhs.runs_.size())
return false;
for (std::size_t i = 0; i < runs_.size(); i++) for (std::size_t i = 0; i < runs_.size(); i++)
{ {
if (runs_[i] != rhs.runs_[i]) if (runs_[i] != rhs.runs_[i])