Skip to content

Commit 8dd0f4a

Browse files
James BarbettiJames Barbetti
James Barbetti
authored and
James Barbetti
committed
Declaring some variables and parameters that can be const, const.
1 parent a316564 commit 8dd0f4a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

stitchup.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ template <class T=double> struct StitchupGraph {
386386
} catch (const char *str) {
387387
std::cerr << "Writing newick file failed: " << str << std::endl;
388388
return false;
389-
} catch (std::string &str) {
389+
} catch (const std::string &str) {
390390
std::cerr << "Writing newick file failed: " << str << std::endl;
391391
return false;
392392
}
@@ -488,7 +488,7 @@ template < class T=double> class StitchupMatrix: public SquareMatrix<T> {
488488
virtual std::string getAlgorithmName() const {
489489
return "STITCHUP";
490490
}
491-
virtual void addCluster(const std::string &name) {
491+
virtual void addCluster(const std::string &name) override {
492492
graph.addLeaf(name);
493493
}
494494
virtual bool loadMatrixFromFile(const std::string &distanceMatrixFilePath) {
@@ -561,8 +561,6 @@ template < class T=double> class StitchupMatrix: public SquareMatrix<T> {
561561
double row_count_triangle = 0.5*(double)row_count*(double)(row_count+1);
562562
const char* task_name = silent ? "" : "Assembling Stitch-up Graph";
563563
progress_display progress(row_count_triangle, task_name );
564-
#else
565-
double progress = 0.0;
566564
#endif
567565
for (intptr_t join = 0; join + 1 < row_count; ++join) {
568566
LengthSortedStitch<T> shortest;
@@ -584,8 +582,9 @@ template < class T=double> class StitchupMatrix: public SquareMatrix<T> {
584582
graph.removeThroughThroughNodes();
585583
return true;
586584
}
587-
virtual bool calculateRMSOfTMinusD(const double* matrix,
588-
intptr_t rank, double& rms) {
585+
586+
virtual bool calculateRMSOfTMinusD(const double* matrix,
587+
intptr_t rank, double& rms) {
589588
return false; //not supported
590589
}
591590
};

0 commit comments

Comments
 (0)