[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:36:22 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=83b6279
The following commit has been merged in the master branch:
commit 83b627964399ef577226845dd3a8069593210916
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Mon May 24 02:21:55 2004 +0000
Updated for the new int score return value of match()
---
src/makernote-test.cpp | 8 ++++----
src/makernote-test.out | 24 ++++++++++++------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/makernote-test.cpp b/src/makernote-test.cpp
index 7502165..03d3b6f 100644
--- a/src/makernote-test.cpp
+++ b/src/makernote-test.cpp
@@ -36,11 +36,11 @@ int main()
void testMatch(const std::string& reg, const std::string& key)
{
- std::pair<bool, int> rc = Exiv2::MakerNoteFactory::match(reg, key);
+ int rc = Exiv2::MakerNoteFactory::match(reg, key);
- if (rc.first) {
- std::cout << "Key '" << key << "' matches '" << reg << "' in "
- << rc.second << " characters.
";
+ if (rc) {
+ std::cout << "Key '" << key << "' matches '" << reg << "' "
+ << "with a score of " << rc << ".
";
}
else {
std::cout << "Key '" << key << "' does not match '" << reg << "'.
";
diff --git a/src/makernote-test.out b/src/makernote-test.out
index 8622d16..21841ce 100644
--- a/src/makernote-test.out
+++ b/src/makernote-test.out
@@ -1,20 +1,20 @@
-Key 'Canon' matches 'Canon' in 5 characters.
-Key 'Canon' matches 'Canon*' in 5 characters.
-Key 'Canon Corp.' matches 'Canon*' in 5 characters.
-Key 'foobar' matches '*foo*bar*' in 6 characters.
-Key 'barfoofoobarbar' matches '*foo*bar*' in 6 characters.
+Key 'Canon' matches 'Canon' with a score of 7.
+Key 'Canon' matches 'Canon*' with a score of 6.
+Key 'Canon Corp.' matches 'Canon*' with a score of 6.
+Key 'foobar' matches '*foo*bar*' with a score of 7.
+Key 'barfoofoobarbar' matches '*foo*bar*' with a score of 7.
Key 'foo' does not match 'foo*bar'.
Key 'bar' does not match 'foo*bar'.
-Key 'foobar' matches 'foo*bar' in 6 characters.
-Key 'fooYAHOObar' matches 'foo*bar' in 6 characters.
+Key 'foobar' matches 'foo*bar' with a score of 7.
+Key 'fooYAHOObar' matches 'foo*bar' with a score of 7.
Key 'Thefoobar' does not match 'foo*bar'.
Key 'foobarTrick' does not match 'foo*bar'.
Key 'ThefoobarTrick' does not match 'foo*bar'.
Key 'ThefooYAHOObarTrick' does not match 'foo*bar'.
-Key 'anything' matches '*' in 0 characters.
-Key 'anything times two' matches '**' in 0 characters.
-Key 'bar' matches '*bar' in 3 characters.
+Key 'anything' matches '*' with a score of 1.
+Key 'anything times two' matches '**' with a score of 1.
+Key 'bar' matches '*bar' with a score of 4.
Key 'bar' does not match 'b*bar'.
-Key 'bbar' matches 'b*bar' in 4 characters.
+Key 'bbar' matches 'b*bar' with a score of 5.
Key 'bar' does not match '*foobar'.
-Key 'foobar' matches '*bar' in 3 characters.
+Key 'foobar' matches '*bar' with a score of 4.
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list