From efab7248025d0fdbc4819bad5aa2a98b962da5fe Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 5 Sep 2015 23:13:36 +0200 Subject: [PATCH] Task: Convince myself Task comparison is implemented correctly --- src/Task.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Task.cpp b/src/Task.cpp index d49b8b641..ce3cc626d 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -125,6 +125,16 @@ Task& Task::operator= (const Task& other) //////////////////////////////////////////////////////////////////////////////// // The uuid and id attributes must be exempt from comparison. +// +// This performs two tests which are sufficient and necessary for Task +// object equality (neglecting uuid and id): +// - The attribute set sizes are the same +// - For each attribute in the first set, there exists a same +// attribute with a same value in the second set +// +// These two conditions are necessary. They are also sufficient, since there +// can be no extra data attribute in the second set, due to the same attribute +// set sizes. bool Task::operator== (const Task& other) { if (size () != other.size ())