From f254cae9bbeedf22d2e8bef168be3620ea8db620 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Wed, 30 Oct 2024 17:15:43 +0100 Subject: [PATCH] cleaning equality (#127) --- src/core/NajaCollection.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/core/NajaCollection.h b/src/core/NajaCollection.h index a909e51a..7f8d7529 100644 --- a/src/core/NajaCollection.h +++ b/src/core/NajaCollection.h @@ -1078,21 +1078,21 @@ template class NajaCollection { size_t size() const { if (collection_) { return collection_->size(); } return 0; } bool empty() const { if (collection_) { return collection_->empty(); } return true; } - //comperator - bool operator==(const NajaCollection& r) const { - if (size() == r.size()) { - auto it = begin(); - auto rit = r.begin(); - while (it != end()) { - if (*it != *rit) { - return false; - } - ++it; - ++rit; - } - return true; - } - return false; + //comparator + bool operator==(const NajaCollection& r) const { + if (size() == r.size()) { + auto it = begin(); + auto rit = r.begin(); + while (it != end()) { + if (*it != *rit) { + return false; + } + ++it; + ++rit; + } + return true; + } + return false; } private: const NajaBaseCollection* collection_ {nullptr};