Make include, exclude, count prefixes NOT substring matches (#670)
This commit is contained in:
parent
b8a06a7f80
commit
05b37ba7ce
|
@ -650,7 +650,7 @@ bool BleFingerprint::shouldCount()
|
|||
bool prevCounting = counting;
|
||||
if (ignore || !countable || !hasValue)
|
||||
counting = false;
|
||||
else if (getMsSinceFirstSeen() <= BleFingerprintCollection::countMs || getMsSinceLastSeen() > BleFingerprintCollection::countMs)
|
||||
else if (getMsSinceLastSeen() > BleFingerprintCollection::countMs)
|
||||
counting = false;
|
||||
else if (counting && output.value.position > BleFingerprintCollection::countExit)
|
||||
counting = false;
|
||||
|
|
|
@ -125,12 +125,12 @@ bool prefixExists(const String &prefixes, const String &s)
|
|||
if (space > start)
|
||||
{
|
||||
auto sub = prefixes.substring(start, space);
|
||||
if (s.indexOf(sub) != -1) return true;
|
||||
if (s.indexOf(sub) == 0) return true;
|
||||
}
|
||||
start = space + 1;
|
||||
}
|
||||
auto sub = prefixes.substring(start);
|
||||
return !sub.isEmpty() && s.indexOf(sub) != -1;
|
||||
return !sub.isEmpty() && s.indexOf(sub) == 0;
|
||||
}
|
||||
|
||||
bool spurt(const String &fn, const String &content)
|
||||
|
|
Loading…
Reference in New Issue