Skip to content

Commit

Permalink
Fix LGTM and revert bugfix for later PR
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatr21 committed May 22, 2019
1 parent 945ccac commit 0bf45e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/ccutil/unicharmap.cpp
Expand Up @@ -39,7 +39,7 @@ UNICHAR_ID UNICHARMAP::unichar_to_id(const char* const unichar_repr,
assert(length > 0 && length <= UNICHAR_LEN);

int index = 0;
if (unichar_repr[index] == '\0') return INVALID_UNICHAR_ID;
if (length <= 0 || unichar_repr[index] == '\0') return INVALID_UNICHAR_ID;
do {
if (index + 1 >= length || unichar_repr[index + 1] == '\0')
return current_nodes[static_cast<unsigned char>(unichar_repr[index])].id;
Expand Down
1 change: 0 additions & 1 deletion src/classify/trainingsampleset.cpp
Expand Up @@ -618,7 +618,6 @@ void TrainingSampleSet::ComputeCanonicalSamples(const IntFeatureMap& map,
if (dist > max_dist) {
max_dist = dist;
if (dist > max_max_dist) {
max_max_dist = dist;
max_s1 = s1;
max_s2 = s2;
}
Expand Down

0 comments on commit 0bf45e8

Please sign in to comment.