From 7971d09927f9f5e4a2141772184c06b65ad62911 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Sat, 23 May 2026 15:55:40 +0200 Subject: [PATCH] Clean code --- lib/src1/bruker2dicom2.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src1/bruker2dicom2.cxx b/lib/src1/bruker2dicom2.cxx index bd983ca..ad2bcd1 100644 --- a/lib/src1/bruker2dicom2.cxx +++ b/lib/src1/bruker2dicom2.cxx @@ -283,7 +283,8 @@ void Bruker2Dicom::DealWithSingleStudyDirectory (const std::string dirname, con { //EED 2026-05-19 // std::string fname = (*it).filename() ; - std::string fname = (*it).path().filename().c_str() ; +// std::string fname = (*it).path().filename().c_str(); + std::string fname = (*it).path().filename().string(); //if (fname == "AdjResult") continue; what's the point? boost::filesystem::directory_iterator it_level((*it)); bool bAcqp = false; @@ -299,8 +300,8 @@ void Bruker2Dicom::DealWithSingleStudyDirectory (const std::string dirname, con //EED 2026-05-19 // strAcqp = (*it_level).string(); // nameAcqp = (*it_level).filename(); - strAcqp = (*it_level).path().string().c_str(); - nameAcqp = (*it_level).path().filename().c_str(); + strAcqp = (*it_level).path().string(); + nameAcqp = (*it_level).path().filename().string(); boost::algorithm::replace_all( strAcqp, INVALID_FILE_SEPARATOR, VALID_FILE_SEPARATOR); bAcqp = true; } @@ -445,7 +446,7 @@ void Bruker2Dicom::DealWithNiveau1(std::string level1Directory, std::string curr { //EED 2026-05-19 // std::string output = createDirectory( (*itDir).leaf() , currentOutputDirName); - std::string output = createDirectory( (*itDir).path().filename().c_str() , currentOutputDirName); + std::string output = createDirectory( (*itDir).path().filename().string() , currentOutputDirName); // will be always "pdata" ... boost::filesystem::directory_iterator itDirInside(*itDir), it_inside_end; for(; itDirInside != it_end; ++it) -- 2.54.0