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;
|
bool prevCounting = counting;
|
||||||
if (ignore || !countable || !hasValue)
|
if (ignore || !countable || !hasValue)
|
||||||
counting = false;
|
counting = false;
|
||||||
else if (getMsSinceFirstSeen() <= BleFingerprintCollection::countMs || getMsSinceLastSeen() > BleFingerprintCollection::countMs)
|
else if (getMsSinceLastSeen() > BleFingerprintCollection::countMs)
|
||||||
counting = false;
|
counting = false;
|
||||||
else if (counting && output.value.position > BleFingerprintCollection::countExit)
|
else if (counting && output.value.position > BleFingerprintCollection::countExit)
|
||||||
counting = false;
|
counting = false;
|
||||||
|
|
|
@ -125,12 +125,12 @@ bool prefixExists(const String &prefixes, const String &s)
|
||||||
if (space > start)
|
if (space > start)
|
||||||
{
|
{
|
||||||
auto sub = prefixes.substring(start, space);
|
auto sub = prefixes.substring(start, space);
|
||||||
if (s.indexOf(sub) != -1) return true;
|
if (s.indexOf(sub) == 0) return true;
|
||||||
}
|
}
|
||||||
start = space + 1;
|
start = space + 1;
|
||||||
}
|
}
|
||||||
auto sub = prefixes.substring(start);
|
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)
|
bool spurt(const String &fn, const String &content)
|
||||||
|
|
Loading…
Reference in New Issue