Mercurial > dedupe
comparison EditDistance.cpp @ 9:b5943e4bf676
Fix up header includes.
Introduce outer catch.
Fix coding style.
Remove spurious debug output.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 22 Aug 2012 18:48:07 +0200 |
| parents | a3834af36579 |
| children | 06166d6c083b |
comparison
equal
deleted
inserted
replaced
| 8:d7b384b4a834 | 9:b5943e4bf676 |
|---|---|
| 21 return out; | 21 return out; |
| 22 } | 22 } |
| 23 | 23 |
| 24 int EditDistance::Compute(QString a, QString b, bool remove) { | 24 int EditDistance::Compute(QString a, QString b, bool remove) { |
| 25 if (remove) { | 25 if (remove) { |
| 26 a=removeDiacritics(a); | 26 a = removeDiacritics(a); |
| 27 b=removeDiacritics(b); | 27 b = removeDiacritics(b); |
| 28 } | 28 } |
| 29 | 29 |
| 30 OrderedPair<QString> lup(a, b); | 30 OrderedPair<QString> lup(a, b); |
| 31 | 31 |
| 32 boost::optional<int> res = cache.value(lup); | 32 boost::optional<int> res = cache.value(lup); |
