fix conversions

This commit is contained in:
gtsoul-tech 2024-05-13 11:03:27 +03:00
parent 6989314295
commit 6830ce21ef
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ bytecode_ptr<NFA> buildLbrVerm16(const CharReach &cr, const depth &repeatMin,
const CharReach escapes(~cr);
if (escapes.count() > 16) {
return nullptr;
return bytecode_ptr<NFA>(nullptr);
}
enum RepeatType rtype = chooseRepeatType(repeatMin, repeatMax, minPeriod,
@ -62,7 +62,7 @@ bytecode_ptr<NFA> buildLbrNVerm16(const CharReach &cr, const depth &repeatMin,
const CharReach escapes(cr);
if (escapes.count() > 16) {
return nullptr;
return bytecode_ptr<NFA>(nullptr);
}
enum RepeatType rtype = chooseRepeatType(repeatMin, repeatMax, minPeriod,

View File

@ -320,7 +320,7 @@ void mergeNfaComponent(NGHolder &dest, const NGHolder &vic, size_t common_len) {
DEBUG_PRINTF("skipping common edge\n");
assert(edge(u, v, dest).second);
// Should never merge edges with different top values.
assert(vic[e].tops == dest[edge(u, v, dest)].tops);
assert(vic[e].tops == dest[edge(u, v, dest).first].tops);
continue;
} else {
assert(is_any_accept(v, dest));