@@ -257,18 +257,15 @@ void resetLocale(std::locale locale){
257257
258258// ------------------------------------------------------------------------------
259259ofFileDialogResult::ofFileDialogResult (){
260- filePath = " " ;
261- fileName = " " ;
262- bSuccess = false ;
263260}
264261
265262// ------------------------------------------------------------------------------
266- std::string ofFileDialogResult::getName (){
263+ of::filesystem::path ofFileDialogResult::getName (){
267264 return fileName;
268265}
269266
270267// ------------------------------------------------------------------------------
271- std::string ofFileDialogResult::getPath (){
268+ of::filesystem::path ofFileDialogResult::getPath (){
272269 return filePath;
273270}
274271
@@ -337,7 +334,7 @@ static int CALLBACK loadDialogBrowseCallback(
337334// ---------------------------------------------------------------------
338335
339336// OS specific results here. "" = cancel or something bad like can't load, can't save, etc...
340- ofFileDialogResult ofSystemLoadDialog (std::string windowTitle, bool bFolderSelection, std::string defaultPath){
337+ ofFileDialogResult ofSystemLoadDialog (std::string windowTitle, bool bFolderSelection, of::filesystem::path defaultPath){
341338
342339 ofFileDialogResult results;
343340
@@ -494,7 +491,7 @@ ofFileDialogResult ofSystemLoadDialog(std::string windowTitle, bool bFolderSelec
494491
495492
496493
497- if ( results.filePath .length () > 0 ){
494+ if ( ! results.filePath .empty () ){
498495 results.bSuccess = true ;
499496 results.fileName = ofFilePath::getFileName (results.filePath );
500497 }
@@ -575,7 +572,7 @@ ofFileDialogResult ofSystemSaveDialog(std::string defaultName, std::string messa
575572 // ----------------------------------------------------------------------------------------
576573 // ----------------------------------------------------------------------------------------
577574
578- if ( results.filePath .length () > 0 ){
575+ if ( ! results.filePath .empty () ){
579576 results.bSuccess = true ;
580577 results.fileName = ofFilePath::getFileName (results.filePath );
581578 }
0 commit comments