Skip to content

Commit

Permalink
fix uninitialised sum
Browse files Browse the repository at this point in the history
  • Loading branch information
gamcil committed Sep 13, 2024
1 parent d695073 commit a11ea57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/commons/MSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ void MSAContainer::remove(std::vector<size_t> &toRemove) {
}

void MSAContainer::addStructure(size_t id, unsigned int key, size_t length, const char* aa, const char* ss) {
cigars_aa[id].reserve(length);
cigars_ss[id].reserve(length);
for (size_t j = 0; j < length; j++) {
cigars_aa[id].emplace_back(aa[j]);
cigars_ss[id].emplace_back(ss[j]);
Expand Down
2 changes: 1 addition & 1 deletion src/strucclustutils/msa2lddt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ double calculate_lddt_pair(
&targetCaData[result.dbLen * 2]
);

double sum;
double sum = 0.0;
for (int i = 0; i < lddtres.scoreLength; i++) {
sum += lddtres.perCaLddtScore[i];
}
Expand Down

0 comments on commit a11ea57

Please sign in to comment.