Skip to content
Snippets Groups Projects
Commit de4ef551 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix invalid use of size_t

parent 664fa376
No related branches found
No related tags found
1 merge request!57Dev
......@@ -49,7 +49,7 @@ ext::set < unsigned > BNDMOccurrences::query ( const indexes::stringology::BitSe
 
ext::bitset < BitmaskBitCount > currentBitmask;
 
while ( posInSubject <= subjectLength - patternLength ) {
while ( posInSubject + patternLength <= subjectLength ) {
size_t posInPattern = bitmaskLength;
size_t lastPosOfFactor = bitmaskLength;
 
......
......@@ -38,7 +38,7 @@ ext::set < unsigned > BackwardDAWGMatching::match ( const string::LinearString <
bool fail;
size_t posInSubject = 0;
 
while ( posInSubject <= subjectSize - patternSize ) {
while ( posInSubject + patternSize <= subjectSize ) {
unsigned currentState = suffixAutomaton.getAutomaton ( ).getInitialState ( );
 
size_t posInPattern = patternSize;
......
......@@ -40,7 +40,7 @@ ext::set < unsigned > BackwardOracleMatching::match ( const string::LinearString
bool fail;
size_t posInSubject = 0;
 
while ( posInSubject <= subjectSize - patternSize ) {
while ( posInSubject + patternSize <= subjectSize ) {
 
StateType currentState = factorOracle.getInitialState ( );
 
......
......@@ -48,7 +48,7 @@ ext::set < unsigned > WideBNDMOccurrences::query ( const indexes::stringology::B
ext::vector < bool > currentBitmask;
currentBitmask.resize ( patternLength );
 
while ( posInSubject <= subjectLength - patternLength ) {
while ( posInSubject + patternLength <= subjectLength ) {
size_t posInPattern = patternLength;
size_t lastPosOfFactor = patternLength;
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment