From 8ece6d3ec1b0105047c192c0aa044e4257118e01 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 22 Sep 2022 00:03:01 -0400 Subject: Add "reverse image search". Fixed a stupid performance degradation in the signature library in the process. --- xsig/src/signature.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xsig/src/signature.cpp') 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; } -- cgit v1.2.3