diff options
author | 2022-09-22 00:03:01 -0400 | |
---|---|---|
committer | 2022-09-22 00:03:01 -0400 | |
commit | 8ece6d3ec1b0105047c192c0aa044e4257118e01 (patch) | |
tree | ca4202e6e41d31c6f73fc7514c237a5b2b2c2764 /xsig/src/signature.cpp | |
parent | 1d41325a9685cf677f8eeaa4940f032931fd8780 (diff) | |
download | deduper-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.cpp | 6 |
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; } |