Daniele Bartolini 10 anni fa
parent
commit
b712b7bb9b

+ 4 - 4
src/core/filesystem/apk_filesystem.cpp

@@ -144,22 +144,22 @@ u64 ApkFilesystem::last_modified_time(const char* path)
 
 void ApkFilesystem::create_directory(const char* /*path*/)
 {
-	CE_ASSERT(false, "Attempt to create directory in Android assets folder");
+	CE_ASSERT(false, "Cannot create directory in Android assets folder");
 }
 
 void ApkFilesystem::delete_directory(const char* /*path*/)
 {
-	CE_ASSERT(false, "Attempt to delete directory in Android assets folder");
+	CE_ASSERT(false, "Cannot delete directory in Android assets folder");
 }
 
 void ApkFilesystem::create_file(const char* /*path*/)
 {
-	CE_ASSERT(false, "Attempt to create file in Android assets folder");
+	CE_ASSERT(false, "Cannot create file in Android assets folder");
 }
 
 void ApkFilesystem::delete_file(const char* /*path*/)
 {
-	CE_ASSERT(false, "Attempt to delete file in Android assets folder");
+	CE_ASSERT(false, "Cannot delete file in Android assets folder");
 }
 
 void ApkFilesystem::list_files(const char* path, Vector<DynamicString>& files)

+ 20 - 20
src/core/filesystem/disk_filesystem.cpp

@@ -99,8 +99,8 @@ File* DiskFilesystem::open(const char* path, FileOpenMode::Enum mode)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	DiskFile* file = CE_NEW(*_allocator, DiskFile)();
@@ -117,8 +117,8 @@ bool DiskFilesystem::exists(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	return os::exists(abs_path.c_str());
@@ -128,8 +128,8 @@ bool DiskFilesystem::is_directory(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	return os::is_directory(abs_path.c_str());
@@ -139,8 +139,8 @@ bool DiskFilesystem::is_file(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	return os::is_file(abs_path.c_str());
@@ -150,8 +150,8 @@ u64 DiskFilesystem::last_modified_time(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	return os::mtime(abs_path.c_str());
@@ -161,8 +161,8 @@ void DiskFilesystem::create_directory(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	if (!os::exists(abs_path.c_str()))
@@ -173,8 +173,8 @@ void DiskFilesystem::delete_directory(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	os::delete_directory(abs_path.c_str());
@@ -184,8 +184,8 @@ void DiskFilesystem::create_file(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	os::create_file(abs_path.c_str());
@@ -195,8 +195,8 @@ void DiskFilesystem::delete_file(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	os::delete_file(abs_path.c_str());
@@ -206,8 +206,8 @@ void DiskFilesystem::list_files(const char* path, Vector<DynamicString>& files)
 {
 	CE_ASSERT_NOT_NULL(path);
 
-	TempAllocator256 alloc;
-	DynamicString abs_path(alloc);
+	TempAllocator256 ta;
+	DynamicString abs_path(ta);
 	get_absolute_path(path, abs_path);
 
 	os::list_files(abs_path.c_str(), files);