diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-06-13 07:32:36 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-06-13 07:32:36 +0000 |
commit | e7fa347f0d0e0160e90ee2f869c8039625aaed5f (patch) | |
tree | 9b52d565f995056f3968fb61a6134169e69e1a1c /src/Persistence_representations/include/gudhi/read_persistence_from_file.h | |
parent | e0634f23c228f5f4061b45a7b9af31a3310e11a4 (diff) |
Fix cppcheck issues
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3601 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 44cc04b1609d3b3d40382fd02d4fe15e5ba0159f
Diffstat (limited to 'src/Persistence_representations/include/gudhi/read_persistence_from_file.h')
-rw-r--r-- | src/Persistence_representations/include/gudhi/read_persistence_from_file.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h index e0fc7107..4a2b9d68 100644 --- a/src/Persistence_representations/include/gudhi/read_persistence_from_file.h +++ b/src/Persistence_representations/include/gudhi/read_persistence_from_file.h @@ -57,7 +57,7 @@ std::vector<std::pair<double, double> > read_persistence_intervals_in_one_dimens std::string line; std::vector<std::pair<double, double> > barcode_initial = - read_persistence_intervals_in_dimension(filename, (int)dimension); + read_persistence_intervals_in_dimension(filename, static_cast<int>(dimension)); std::vector<std::pair<double, double> > final_barcode; final_barcode.reserve(barcode_initial.size()); @@ -92,8 +92,8 @@ std::vector<std::pair<double, double> > read_persistence_intervals_in_one_dimens if ((barcode_initial[i].second == std::numeric_limits<double>::infinity()) && (what_to_substitute_for_infinite_bar != -1)) { - if (barcode_initial[i].first < what_to_substitute_for_infinite_bar) // if only birth < death. - { + if (barcode_initial[i].first < what_to_substitute_for_infinite_bar) { + // if only birth < death. final_barcode.push_back( std::pair<double, double>(barcode_initial[i].first, what_to_substitute_for_infinite_bar)); } |