diff --git a/src/multipath_alignment_graph.cpp b/src/multipath_alignment_graph.cpp index 6cc2620f91..9038dff638 100644 --- a/src/multipath_alignment_graph.cpp +++ b/src/multipath_alignment_graph.cpp @@ -6505,7 +6505,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap for (const auto& path_node : path_nodes) { for (const auto& edge : path_node.edges) { const auto& next_node = path_nodes[edge.first]; - shift = max(shift, abs((next_node.begin - path_node.end) - edge.second)); + shift = max(shift, std::abs(static_cast((next_node.begin - path_node.end) - edge.second))); } } return shift; @@ -6529,7 +6529,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap ++in_degree[edge.first]; const auto& next_node = path_nodes[edge.first]; - size_t shift = abs((next_node.begin - path_node.end) - edge.second); + size_t shift = std::abs(static_cast((next_node.begin - path_node.end) - edge.second)); #ifdef debug_shift_pruning cerr << "shift DP reverse " << i << " <- " << edge.first << " with shift " << shift << " for total " << min_shift_rev[edge.first] + shift << endl; @@ -6555,7 +6555,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap else { for (auto& edge : path_node.edges) { const auto& next_node = path_nodes[edge.first]; - size_t shift = abs((next_node.begin - path_node.end) - edge.second); + size_t shift = std::abs(static_cast((next_node.begin - path_node.end) - edge.second)); #ifdef debug_shift_pruning cerr << "shift DP forward " << i << " -> " << edge.first << " with shift " << shift << " for total " << min_shift_fwd[i] + shift << endl; #endif @@ -6577,7 +6577,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap for (size_t j = 0; j < path_node.edges.size(); ++j) { auto& edge = path_node.edges[j]; const auto& next_node = path_nodes[edge.first]; - size_t shift = abs((next_node.begin - path_node.end) - edge.second); + size_t shift = std::abs(static_cast((next_node.begin - path_node.end) - edge.second)); size_t min_edge_shift = min_shift_fwd[i] + shift + min_shift_rev[edge.first]; diff --git a/src/multipath_mapper.cpp b/src/multipath_mapper.cpp index 4632edee8b..4241fa12e6 100644 --- a/src/multipath_mapper.cpp +++ b/src/multipath_mapper.cpp @@ -2448,7 +2448,7 @@ namespace vg { // in the left_idxs and right_idxs vectors int64_t target_len = 2 * seq_len - left_side.clip_length - right_side.clip_length; auto distance_diff = [&](size_t l, size_t r) { - return abs(get<2>(left_sites[left_idxs[l]]) + get<2>(right_sites[right_idxs[r]]) - target_len); + return std::abs(static_cast(get<2>(left_sites[left_idxs[l]]) + get<2>(right_sites[right_idxs[r]]) - target_len)); }; // sweep to identify pairs that most nearly align diff --git a/src/recombinator.cpp b/src/recombinator.cpp index a9aaed4b10..07915118ed 100644 --- a/src/recombinator.cpp +++ b/src/recombinator.cpp @@ -1585,7 +1585,7 @@ void add_path(const gbwt::GBWT& source, gbwt::size_type path_id, gbwt::GBWTBuild gbwt::PathName path_name = source.metadata.path(path_id); std::string sample_name = source.metadata.sample(path_name.sample); std::string contig_name = source.metadata.contig(path_name.contig); - if (sample_name == gbwtgraph::REFERENCE_PATH_SAMPLE_NAME) { + if (sample_name == gbwtgraph::GENERIC_PATH_SAMPLE_NAME) { metadata.add_generic_path(contig_name); } else { // Reference samples will be copied later. diff --git a/src/subcommand/gampcompare_main.cpp b/src/subcommand/gampcompare_main.cpp index 72c84c289e..6730fc8d81 100644 --- a/src/subcommand/gampcompare_main.cpp +++ b/src/subcommand/gampcompare_main.cpp @@ -216,7 +216,7 @@ int main_gampcompare(int argc, char** argv) { if (path_true_positions[i].second == path_mapped_positions[j].second) { // there is a pair of positions on the same strand of the same path abs_dist = min(abs_dist, - abs(path_true_positions[i].first - path_mapped_positions[j].first)); + std::abs(static_cast(path_true_positions[i].first - path_mapped_positions[j].first))); } } }