@@ -257,18 +257,15 @@ void resetLocale(std::locale locale){
257
257
258
258
// ------------------------------------------------------------------------------
259
259
ofFileDialogResult::ofFileDialogResult (){
260
- filePath = " " ;
261
- fileName = " " ;
262
- bSuccess = false ;
263
260
}
264
261
265
262
// ------------------------------------------------------------------------------
266
- std::string ofFileDialogResult::getName (){
263
+ of::filesystem::path ofFileDialogResult::getName (){
267
264
return fileName;
268
265
}
269
266
270
267
// ------------------------------------------------------------------------------
271
- std::string ofFileDialogResult::getPath (){
268
+ of::filesystem::path ofFileDialogResult::getPath (){
272
269
return filePath;
273
270
}
274
271
@@ -337,7 +334,7 @@ static int CALLBACK loadDialogBrowseCallback(
337
334
// ---------------------------------------------------------------------
338
335
339
336
// 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){
341
338
342
339
ofFileDialogResult results;
343
340
@@ -494,7 +491,7 @@ ofFileDialogResult ofSystemLoadDialog(std::string windowTitle, bool bFolderSelec
494
491
495
492
496
493
497
- if ( results.filePath .length () > 0 ){
494
+ if ( ! results.filePath .empty () ){
498
495
results.bSuccess = true ;
499
496
results.fileName = ofFilePath::getFileName (results.filePath );
500
497
}
@@ -575,7 +572,7 @@ ofFileDialogResult ofSystemSaveDialog(std::string defaultName, std::string messa
575
572
// ----------------------------------------------------------------------------------------
576
573
// ----------------------------------------------------------------------------------------
577
574
578
- if ( results.filePath .length () > 0 ){
575
+ if ( ! results.filePath .empty () ){
579
576
results.bSuccess = true ;
580
577
results.fileName = ofFilePath::getFileName (results.filePath );
581
578
}
0 commit comments