(UWP VFS) Code formatting cleanups

This commit is contained in:
twinaphex 2019-04-07 21:58:10 +02:00
parent 79ffb53ef2
commit dd016c44c9

View File

@ -267,7 +267,8 @@ struct libretro_vfs_implementation_file
char* orig_path;
};
libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, unsigned mode, unsigned hints)
libretro_vfs_implementation_file *retro_vfs_file_open_impl(
const char *path, unsigned mode, unsigned hints)
{
char *filename = NULL;
char *dirpath = NULL;
@ -299,15 +300,16 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns
dirpath_wide = utf8_to_utf16_string_alloc(dirpath);
windowsize_path(dirpath_wide);
Platform::String^ dirpath_str = ref new Platform::String(dirpath_wide);
free(dirpath_wide);
free(dirpath);
filename = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
fill_pathname_base(filename, path, PATH_MAX_LENGTH);
filename_wide = utf8_to_utf16_string_alloc(filename);
Platform::String^ filename_str = ref new Platform::String(filename_wide);
free(filename_wide);
free(filename);
free(dirpath_wide);
free(dirpath);
retro_assert(!dirpath_str->IsEmpty() && !filename_str->IsEmpty());
@ -558,7 +560,10 @@ int retro_vfs_file_rename_impl(const char *old_path, const char *new_path)
free(new_file_name_wide);
free(new_file_name);
retro_assert(!old_path_str->IsEmpty() && !new_dir_path_str->IsEmpty() && !new_file_name_str->IsEmpty());
retro_assert(
!old_path_str->IsEmpty()
&& !new_dir_path_str->IsEmpty()
&& !new_file_name_str->IsEmpty());
return RunAsyncAndCatchErrors<int>([=]() {
concurrency::task<StorageFile^> old_file_task = concurrency::create_task(LocateStorageItem<StorageFile>(old_path_str));