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

tidy: 1 vs true, 0 vs false

parent db2510c7
No related branches found
No related tags found
1 merge request!200clang tidy fixes
......@@ -24,31 +24,31 @@ ext::set<unsigned int> LevenshteinBitParalelism::search(const string::LinearStri
 
ext::map<SymbolType, ext::vector<bool> > D_vectors = BitParalelism::constructDVectors(common_alphabet, pattern);
 
auto V_vector = ext::vector<bool>(pattern.getContent().size(), 0);
V_vector[pattern.getContent().size() - 1] = 1;
ext::vector<bool> V_vector (pattern.getContent().size(), false);
V_vector[pattern.getContent().size() - 1] = true;
 
// computation part
ext::set<unsigned int> result;
 
ext::vector<ext::vector<bool> > B_vectors;
for(unsigned int i=0; i<=errors; i++) {
B_vectors.push_back(ext::vector<bool>(pattern.getContent().size(), 0));
B_vectors.push_back(ext::vector<bool>(pattern.getContent().size(), false));
}
 
for(unsigned int l = 0; l <= errors; l++) {
for(unsigned int j = l; j <= pattern.getContent().size(); j++) {
B_vectors[l][j] = 1;
B_vectors[l][j] = true;
}
}
 
// 0-th column
ext::vector<bool> b0 = ext::vector < bool > ( pattern.getContent().size(), true );
for(unsigned int j=1; j<=errors; j++) {
b0 <<= 1;
if(b0[pattern.getContent().size()-1] == false) {
result.insert(0);
break;
}
b0 <<= 1;
if ( ! b0 [ pattern.getContent ( ).size ( ) - 1 ] ) {
result.insert(0);
break;
}
}
 
 
......@@ -64,7 +64,7 @@ ext::set<unsigned int> LevenshteinBitParalelism::search(const string::LinearStri
}
 
for (const auto & data : B_vectors) {
if(data[pattern.getContent().size()-1] == false) {
if ( ! data [ pattern.getContent ( ).size ( ) - 1 ] ) {
result.insert(i+1);
break;
}
......
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