From cb55735644c30d3a7119e72f5ee85664b36d9944 Mon Sep 17 00:00:00 2001 From: Andrii Tkachenko Date: Thu, 8 Feb 2018 09:51:50 +0100 Subject: [PATCH] xLnt. rich_text operator less fixed. --- source/cell/rich_text.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/cell/rich_text.cpp b/source/cell/rich_text.cpp index 11d2bca0..d73346c1 100644 --- a/source/cell/rich_text.cpp +++ b/source/cell/rich_text.cpp @@ -87,12 +87,9 @@ void rich_text::add_run(const rich_text_run &t) bool rich_text::operator<(const rich_text &rhs) const { - if (runs_.size() < rhs.runs_.size()) - return true; + if (runs_.size() != rhs.runs_.size()) + return runs_.size() < rhs.runs_.size(); - if (runs_.size() > rhs.runs_.size()) - return false; - for (std::size_t i = 0; i < runs_.size(); i++) { if (runs_[i] != rhs.runs_[i])