From 0b408792c083eb64a5ca737bdbcb30b1d64042e9 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 26 Oct 2023 23:31:12 +0200 Subject: FLUID: Refactors MergeBack * moved functionality into its own files * refactored all methods to be less than a page * documented all calls * tested all situations I could think of --- fluid/fluid.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'fluid/fluid.cxx') diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index eaaaa53f0..e8a106d64 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -27,6 +27,7 @@ #include "undo.h" #include "file.h" #include "code.h" +#include "mergeback.h" #include "alignment_panel.h" #include "function_panel.h" @@ -1284,13 +1285,9 @@ int mergeback_code_files() return 0; } - // -- generate the file names with absolute paths - Fd_Code_Writer f; Fl_String code_filename = g_project.codefile_path() + g_project.codefile_name(); - - // -- write the code and header files if (!batch_mode) enter_project_dir(); - int c = f.merge_back(code_filename.c_str(), FD_MERGEBACK_INTERACTIVE); + int c = merge_back(code_filename, FD_MERGEBACK_INTERACTIVE); if (!batch_mode) leave_project_dir(); if (c==0) fl_message("MergeBack found no external modifications\n" "in the source code."); -- cgit v1.2.3