@@ -158,7 +158,7 @@ static bool prepare_output_directory(const fs::path& output_dir, const bool resu
158158 if (e)
159159 {
160160 TNTN_LOG_ERROR (" unable to create output directory {} with message: {}" ,
161- output_dir.c_str (),
161+ output_dir.string (). c_str (),
162162 e.message ());
163163 return false ;
164164 }
@@ -167,13 +167,13 @@ static bool prepare_output_directory(const fs::path& output_dir, const bool resu
167167 // make sure it is a directory
168168 if (!fs::is_directory (output_dir, e))
169169 {
170- TNTN_LOG_ERROR (" output directory {} is not a directory" , output_dir.c_str ());
170+ TNTN_LOG_ERROR (" output directory {} is not a directory" , output_dir.string (). c_str ());
171171 return false ;
172172 }
173173 if (e)
174174 {
175175 TNTN_LOG_ERROR (" filesystem error while checking output directory {} with message: {}" ,
176- output_dir.c_str (),
176+ output_dir.string (). c_str (),
177177 e.message ());
178178 return false ;
179179 }
@@ -183,13 +183,13 @@ static bool prepare_output_directory(const fs::path& output_dir, const bool resu
183183 // make sure it is empty
184184 if (!fs::is_empty (output_dir, e))
185185 {
186- TNTN_LOG_ERROR (" output directory {} is not empty" , output_dir.c_str ());
186+ TNTN_LOG_ERROR (" output directory {} is not empty" , output_dir.string (). c_str ());
187187 return false ;
188188 }
189189 if (e)
190190 {
191191 TNTN_LOG_ERROR (" filesystem error while checking output directory {} with message: {}" ,
192- output_dir.c_str (),
192+ output_dir.string (). c_str (),
193193 e.message ());
194194 return false ;
195195 }
@@ -662,13 +662,13 @@ static bool write_mesh_as_obj_and_off(const fs::path& parametrization_subdir,
662662
663663 bool rc = true ;
664664 File f;
665- if (f.open (obj_filename.c_str (), File::OM_RWC ))
665+ if (f.open (obj_filename.string (). c_str (), File::OM_RWC ))
666666 {
667667 rc = rc && write_mesh_as_obj (f, m);
668668 f.close ();
669669 }
670670
671- if (f.open (off_filename.c_str (), File::OM_RWC ))
671+ if (f.open (off_filename.string (). c_str (), File::OM_RWC ))
672672 {
673673 rc = rc && write_mesh_as_off (f, m);
674674 f.close ();
@@ -688,7 +688,7 @@ static bool write_raster_as_asc_with_prefix(const fs::path& parametrization_subd
688688 raster_filename = parametrization_subdir / raster_filename;
689689
690690 File f;
691- if (!f.open (raster_filename.c_str (), File::OM_RWC ))
691+ if (!f.open (raster_filename.string (). c_str (), File::OM_RWC ))
692692 {
693693 return false ;
694694 }
@@ -941,7 +941,7 @@ static bool run_all_dem2tin_method_benchmarks_on_single_file(
941941
942942 // create is_done_file to signal to later resume runs
943943 File f;
944- f.open (is_done_file.c_str (), File::OM_RWC );
944+ f.open (is_done_file.string (). c_str (), File::OM_RWC );
945945 }
946946 }
947947 return true ;
@@ -1006,7 +1006,7 @@ bool run_dem2tin_method_benchmarks(const std::string& output_dir,
10061006 const auto benchmark_csv_filename = output_dir_p / " tin_terrain_benchmarks.csv" ;
10071007 if (resume && fs::exists (benchmark_csv_filename))
10081008 {
1009- if (!csv_file->open (benchmark_csv_filename.c_str (), File::OM_RW ))
1009+ if (!csv_file->open (benchmark_csv_filename.string (). c_str (), File::OM_RW ))
10101010 {
10111011 TNTN_LOG_ERROR (" unable to open CSV output file {} for resume" ,
10121012 benchmark_csv_filename.string ());
@@ -1015,7 +1015,7 @@ bool run_dem2tin_method_benchmarks(const std::string& output_dir,
10151015 }
10161016 else
10171017 {
1018- if (!csv_file->open (benchmark_csv_filename.c_str (), File::OM_RWC ))
1018+ if (!csv_file->open (benchmark_csv_filename.string (). c_str (), File::OM_RWC ))
10191019 {
10201020 TNTN_LOG_ERROR (" unable to create CSV output file {} for writing" ,
10211021 benchmark_csv_filename.string ());
0 commit comments