From 4eef6f1fcd6edebcbf71924325c43041bd886126 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 12 Apr 2018 12:10:24 +0200 Subject: [PATCH] Fix build broken by previous merge. --- src/content/content-type.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/content/content-type.cpp b/src/content/content-type.cpp index 6463a501a..b509c6ed2 100644 --- a/src/content/content-type.cpp +++ b/src/content/content-type.cpp @@ -133,7 +133,18 @@ bool ContentType::weakEqual (const ContentType &other) const { } bool ContentType::operator== (const ContentType &other) const { - return weakEqual(other) && (getParameter() == other.getParameter()); + if (!weakEqual(other)) + return false; + if (getParameters().size() != other.getParameters().size()) + return false; + for (const auto ¶m : getParameters()) { + auto it = other.findParameter(param.getName()); + if (it == other.getParameters().cend()) + return false; + if (it->getValue() != param.getValue()) + return false; + } + return true; } bool ContentType::operator!= (const ContentType &other) const {