Make Location, Message, MessageContent and Tag comparisons case-sensitive

It makes more sense for their data.
This commit is contained in:
Oliver Hamlet
2018-10-20 12:48:21 +01:00
parent fa37dc6754
commit b142dd1a8f
14 changed files with 68 additions and 55 deletions
+3 -4
View File
@@ -54,15 +54,14 @@ public:
/**
* A less-than operator implemented with no semantics so that Location objects
* can be stored in sets.
* @returns True if this Location's URL is case-insensitively
* lexicographically less than the given Location's URL, false
* otherwise.
* @returns True if this Location's URL string is lexicographically less than
* the given Location's URL string, false otherwise.
*/
LOOT_API bool operator<(const Location& rhs) const;
/**
* Check if two Location objects are equal by comparing their URLs.
* @returns True if the URLs are case-insensitively equal, false otherwise.
* @returns True if the URL strings are equal, false otherwise.
*/
LOOT_API bool operator==(const Location& rhs) const;
+2 -5
View File
@@ -79,11 +79,8 @@ public:
/**
* A less-than operator implemented with no semantics so that Message objects
* can be stored in sets.
* @returns If both messages have content, returns true if this Message's
* English text is case-insensitively lexicographically less than the
* given Message's English text, and false otherwise.
* Otherwise returns true if this Message has no content, and false
* otherwise.
* @returns Returns true if this Message's content is lexicographically less
* than the given Message's content, and false otherwise.
*/
LOOT_API bool operator<(const Message& rhs) const;
+3 -4
View File
@@ -73,15 +73,14 @@ public:
/**
* A less-than operator implemented with no semantics so that MessageContent
* objects can be stored in sets.
* @returns True if this MessageContent's text is case-insensitively
* lexicographically less than the given MessageContent's text, false
* otherwise.
* @returns True if this MessageContent's text is lexicographically less than
* the given MessageContent's text, false otherwise.
*/
LOOT_API bool operator<(const MessageContent& rhs) const;
/**
* Check if two MessageContent objects are equal by comparing their texts.
* @returns True if the texts are case-insensitively equal, false otherwise.
* @returns True if the texts are equal, false otherwise.
*/
LOOT_API bool operator==(const MessageContent& rhs) const;
+3 -5
View File
@@ -62,17 +62,15 @@ public:
* can be stored in sets.
* @returns True if this Tag is suggested for addition and the other is not.
* If both Tags are suggested for addition or both are suggested for
* removal, returns true if this Tag's name is case-insensitively
* lexicographically less than the given Tag's name, false
* otherwise.
* removal, returns true if this Tag's name is lexicographically less
* than the given Tag's name, false otherwise.
*/
LOOT_API bool operator<(const Tag& rhs) const;
/**
* Check if two Tag objects are equal.
* @returns True if both Tags are suggested for addition or both are suggested
* for removal, and the Tag names are case-insensitively equal, false
* otherwise.
* for removal, and the Tag names are equal, false otherwise.
*/
LOOT_API bool operator==(const Tag& rhs) const;