From b223bc9fea6bad9c0c4d0e86662f5c4c0de513c2 Mon Sep 17 00:00:00 2001 From: FormerLurker Date: Sat, 24 Oct 2020 12:02:25 -0500 Subject: Move segmented_shape default params to .h. Fix compiler warnings. --- ArcWelder/arc_welder.h | 4 ++-- ArcWelder/segmented_shape.cpp | 2 +- ArcWelder/segmented_shape.h | 2 +- ArcWelderConsole/ArcWelderConsole.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArcWelder/arc_welder.h b/ArcWelder/arc_welder.h index a6fbc38..50917be 100644 --- a/ArcWelder/arc_welder.h +++ b/ArcWelder/arc_welder.h @@ -81,7 +81,7 @@ struct source_target_segment_statistics { source_segments.push_back(segment_statistic(current_min, -1.0f)); target_segments.push_back(segment_statistic(current_min, -1.0f)); max_width = utilities::get_num_digits(current_min); - p_logger_ = p_logger_; + p_logger_ = p_logger; logger_type_ = 0; } @@ -116,7 +116,7 @@ struct source_target_segment_statistics { for (int index = 0; index < (*stats).size(); index++) { segment_statistic& stat = (*stats)[index]; - if (stat.min_mm <= length && stat.max_mm > length || (index + 1) == (*stats).size()) + if ( (stat.min_mm <= length && stat.max_mm > length) || (index + 1) == (*stats).size()) { stat.count++; break; diff --git a/ArcWelder/segmented_shape.cpp b/ArcWelder/segmented_shape.cpp index cd5d808..6ec8d84 100644 --- a/ArcWelder/segmented_shape.cpp +++ b/ArcWelder/segmented_shape.cpp @@ -306,7 +306,7 @@ bool arc::try_create_arc(const circle& c, const array_list& points, doubl } #pragma endregion -segmented_shape::segmented_shape(int min_segments = DEFAULT_MIN_SEGMENTS, int max_segments = DEFAULT_MAX_SEGMENTS, double resolution_mm = DEFAULT_RESOLUTION_MM) : points_(max_segments) +segmented_shape::segmented_shape(int min_segments, int max_segments, double resolution_mm) : points_(max_segments) { max_segments_ = max_segments; diff --git a/ArcWelder/segmented_shape.h b/ArcWelder/segmented_shape.h index 957ceab..09d3d86 100644 --- a/ArcWelder/segmented_shape.h +++ b/ArcWelder/segmented_shape.h @@ -175,7 +175,7 @@ class segmented_shape { public: - segmented_shape(int min_segments, int max_segments, double resolution_mm); + segmented_shape(int min_segments = DEFAULT_MIN_SEGMENTS, int max_segments = DEFAULT_MAX_SEGMENTS, double resolution_mm = DEFAULT_RESOLUTION_MM); segmented_shape& operator=(const segmented_shape& pos); virtual ~segmented_shape(); int get_num_segments(); diff --git a/ArcWelderConsole/ArcWelderConsole.cpp b/ArcWelderConsole/ArcWelderConsole.cpp index a0e2567..6354742 100644 --- a/ArcWelderConsole/ArcWelderConsole.cpp +++ b/ArcWelderConsole/ArcWelderConsole.cpp @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) if (source_file_path == target_file_path) { overwrite_source_file = true; - if (!utilities::get_temp_file_path_for_file(source_file_path, target_file_path)); + if (!utilities::get_temp_file_path_for_file(source_file_path, target_file_path)) { log_messages << "The source and target path are the same, but a temporary file path could not be created. Is the path empty?"; p_logger->log(0, INFO, log_messages.str()); -- cgit v1.2.3