# HG changeset patch # User Chris Cannam # Date 1267462527 0 # Node ID 9729919e589cf48c73c99a34091db45332f2cc02 # Parent 7d8a6167febb629d18677bfbb98060f454898a6a * minor fix to text matching diff -r 7d8a6167febb -r 9729919e589c common/Objects.cpp --- a/common/Objects.cpp Mon Mar 01 16:51:14 2010 +0000 +++ b/common/Objects.cpp Mon Mar 01 16:55:27 2010 +0000 @@ -550,11 +550,10 @@ } if (!quick) { - int minlen = std::min(nel.length(), tel.length()); - if (minlen > 3) { + if (tel.length() > 3) { EditDistance ed(EditDistance::RestrictedTransposition); int dist = calculateThresholdedDistance - (ed, nel.left(minlen), tel.left(minlen)); + (ed, nel.left(tel.length()), tel); if (dist >= 0) { component = 0.08 - dist * 0.01; if (sl.contains(nel)) component *= 1.5;