mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Dev/pvs studio cleanups2 (#2877)
* a round of cleanups courtesy of PVS studio * add a test to make sure that a warning is a false alarm * bug fix * Fix a UFF bug * more PVS studio cleanups * next round of PVS studio cleanups * completely remove the chances for that bug * changes in response to review * add an additional test + a bit of reformatting that snuck in
This commit is contained in:
@@ -480,11 +480,8 @@ double DiceSimilarity(const SparseIntVect<IndexType> &v1,
|
||||
v2Sum = v2.getTotalVal(true);
|
||||
double denom = v1Sum + v2Sum;
|
||||
if (fabs(denom) < 1e-6) {
|
||||
if (returnDistance) {
|
||||
return 1.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
// no need to worry about returnDistance here
|
||||
return 0.0;
|
||||
}
|
||||
double minV = v1Sum < v2Sum ? v1Sum : v2Sum;
|
||||
if (2. * minV / denom < bounds) {
|
||||
|
||||
Reference in New Issue
Block a user