[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:45:06 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=0404bc7

The following commit has been merged in the master branch:
commit 0404bc75e99b71b93d28d1f9af9a21c7002ca6ad
Author: Robin Mills <robin at clanmills.com>
Date:   Sun Apr 19 20:25:01 2015 +0000

    #1058.  Change comparator to return -1 : 0 : 1
---
 include/exiv2/value.hpp | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp
index 22005ad..738b4ea 100644
--- a/include/exiv2/value.hpp
+++ b/include/exiv2/value.hpp
@@ -872,21 +872,29 @@ namespace Exiv2 {
     }; // class XmpArrayValue
 
     /*!
-      @brief %LangAltValueComparison
+      @brief %LangAltValueComparator
 
       #1058
 	  https://www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMPSpecificationPart1.pdf
 	  XMP spec chapter B.4 (page 42) the xml:lang qualifier is to be compared case insensitive.
       */
 	struct LangAltValueComparator {
-		bool operator() (const std::string& str1, const std::string& str2) const
+		int operator() (const std::string& str1, const std::string& str2) const
 		{
-    		bool result = str1.size() != str2.size();
-    		for (std::string::const_iterator c1 = str1.begin()
-    		                               , c2 = str2.begin()
-    		    ; result && c1 != str1.end()
-    		    ; ++c1, ++c2) {
-        			result = tolower(*c1) != tolower(*c2);
+    		int result = str1.size() < str2.size() ? -1
+    		           : str1.size() > str2.size() ?  1
+    		           : 0
+    		           ;
+    		std::string::const_iterator c1 = str1.begin();
+    		std::string::const_iterator c2 = str2.begin();
+    		for (
+    		    ; result==0 && c1 != str1.end()
+    		    ; ++c1, ++c2
+    		    ) {
+        		result = tolower(*c1) < tolower(*c2) ? -1
+        		       : tolower(*c1) > tolower(*c2) ?  1
+        		       : 0
+        		       ;
     		}
     		return result;
     	}

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list