aboutsummaryrefslogtreecommitdiff
path: root/xsig/src/signature.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-22 00:03:01 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-22 00:03:01 -0400
commit8ece6d3ec1b0105047c192c0aa044e4257118e01 (patch)
treeca4202e6e41d31c6f73fc7514c237a5b2b2c2764 /xsig/src/signature.cpp
parent1d41325a9685cf677f8eeaa4940f032931fd8780 (diff)
downloaddeduper-8ece6d3ec1b0105047c192c0aa044e4257118e01.tar.xz
Add "reverse image search".
Fixed a stupid performance degradation in the signature library in the process.
Diffstat (limited to 'xsig/src/signature.cpp')
-rw-r--r--xsig/src/signature.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xsig/src/signature.cpp b/xsig/src/signature.cpp
index 1f0ec28..0f0b2e9 100644
--- a/xsig/src/signature.cpp
+++ b/xsig/src/signature.cpp
@@ -226,19 +226,19 @@ signature signature::clone() const
double signature::length() const
{
- if (!p) {fprintf(stderr, "length: null signature"); return -1;}
+ if (!p) {fprintf(stderr, "length: null signature\n"); return -1;}
return p->length();
}
double signature::distance(const signature &o) const
{
- if (!p || !o.p) {fprintf(stderr, "distance: null signature"); return -1;}
+ if (!p || !o.p) {fprintf(stderr, "distance: null signature\n"); return -1;}
return p->distance(*o.p);
}
bool signature::operator==(const signature &o) const
{
- if (!p || !o.p) {fprintf(stderr, "eq: null signature"); return false;}
+ if (!p || !o.p) {fprintf(stderr, "eq: null signature\n"); return false;}
return *p == *o.p;
}