summaryrefslogtreecommitdiffstats
path: root/core/save-profiledata.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-07-06 15:34:31 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-07-06 11:23:35 -0700
commitae60fdf815d1febe36b5f43642a28afbaf84362b (patch)
tree20e33d82b358bab3fb582969c455e188683c1cf4 /core/save-profiledata.c
parent69be1e23f231081e6bad98903c10782faf5104a7 (diff)
downloadsubsurface-ae60fdf815d1febe36b5f43642a28afbaf84362b.tar.gz
Cleanup: call calculate_max_limits_new() in create_plot_info_new()
All callers of create_plot_info_new() called calculate_max_limits_new() a line before. Thus, simply call the latter in the former. This allows us to automatically free the plot data in create_plot_info_new(). The old code overwrote the corresponding field with NULL. As a side-effect, this removes a bogus static variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-profiledata.c')
-rw-r--r--core/save-profiledata.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/save-profiledata.c b/core/save-profiledata.c
index d999d4b49..a88ce8ae1 100644
--- a/core/save-profiledata.c
+++ b/core/save-profiledata.c
@@ -202,7 +202,6 @@ static void save_profiles_buffer(struct membuffer *b, bool select_only)
for_each_dive(i, dive) {
if (select_only && !dive->selected)
continue;
- pi = calculate_max_limits_new(dive, &dive->dc);
create_plot_info_new(dive, &dive->dc, &pi, false, planner_deco_state);
put_headers(b);
put_format(b, "\n");
@@ -221,7 +220,6 @@ void save_subtitles_buffer(struct membuffer *b, struct dive *dive, int offset, i
struct plot_info pi;
struct deco_state *planner_deco_state = NULL;
- pi = calculate_max_limits_new(dive, &dive->dc);
create_plot_info_new(dive, &dive->dc, &pi, false, planner_deco_state);
put_format(b, "[Script Info]\n");