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

remove not needed expression fragments

parent fe3fe5bc
No related branches found
No related tags found
No related merge requests found
......@@ -35,10 +35,10 @@ ext::vector<size_t> BorderArray::construct(const string::LinearString < SymbolTy
res[1] = 0;
for(size_t i = 1; i < w.size(); i++) {
size_t b = res[i];
while (b > 0 && w[i + 1 - 1] != w[b + 1 - 1])
while (b > 0 && w[i] != w[b])
b = res[b];
 
if(w[i + 1 - 1] == w[b + 1 - 1])
if(w[i] == w[b])
res[i + 1] = b + 1;
else
res[i + 1] = 0;
......
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