mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Fix code style issues
This commit is contained in:
parent
16fa788510
commit
c3b0ee5941
@ -223,7 +223,6 @@ public:
|
|||||||
|
|
||||||
virtual String get_filesystem_type() const;
|
virtual String get_filesystem_type() const;
|
||||||
|
|
||||||
|
|
||||||
DirAccessPack();
|
DirAccessPack();
|
||||||
~DirAccessPack();
|
~DirAccessPack();
|
||||||
};
|
};
|
||||||
|
@ -342,7 +342,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
|
|||||||
int erindex = f->get_32();
|
int erindex = f->get_32();
|
||||||
|
|
||||||
if (erindex < 0 || erindex >= external_resources.size()) {
|
if (erindex < 0 || erindex >= external_resources.size()) {
|
||||||
WARN_PRINT("Broken external resource! (index out of size");
|
WARN_PRINT("Broken external resource! (index out of size)");
|
||||||
r_v = Variant();
|
r_v = Variant();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
virtual Error rename(String p_from, String p_to) = 0;
|
virtual Error rename(String p_from, String p_to) = 0;
|
||||||
virtual Error remove(String p_name) = 0;
|
virtual Error remove(String p_name) = 0;
|
||||||
|
|
||||||
virtual String get_filesystem_type() const=0 ;
|
virtual String get_filesystem_type() const = 0;
|
||||||
static String get_full_path(const String &p_path, AccessType p_access);
|
static String get_full_path(const String &p_path, AccessType p_access);
|
||||||
static DirAccess *create_for_path(const String &p_path);
|
static DirAccess *create_for_path(const String &p_path);
|
||||||
|
|
||||||
|
@ -84,7 +84,6 @@ public:
|
|||||||
|
|
||||||
virtual String get_filesystem_type() const;
|
virtual String get_filesystem_type() const;
|
||||||
|
|
||||||
|
|
||||||
DirAccessUnix();
|
DirAccessUnix();
|
||||||
~DirAccessUnix();
|
~DirAccessUnix();
|
||||||
};
|
};
|
||||||
|
@ -347,27 +347,27 @@ size_t DirAccessWindows::get_space_left() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String DirAccessWindows::get_filesystem_type() const {
|
String DirAccessWindows::get_filesystem_type() const {
|
||||||
String path = fix_path(const_cast<DirAccessWindows*>(this)->get_current_dir());
|
String path = fix_path(const_cast<DirAccessWindows *>(this)->get_current_dir());
|
||||||
print_line("fixed path: "+path);
|
print_line("fixed path: " + path);
|
||||||
int unit_end = path.find(":");
|
int unit_end = path.find(":");
|
||||||
ERR_FAIL_COND_V(unit_end==-1,String());
|
ERR_FAIL_COND_V(unit_end == -1, String());
|
||||||
String unit = path.substr(0,unit_end+1) + "\\";
|
String unit = path.substr(0, unit_end + 1) + "\\";
|
||||||
print_line("unit: "+unit);
|
print_line("unit: " + unit);
|
||||||
|
|
||||||
WCHAR szVolumeName[100];
|
WCHAR szVolumeName[100];
|
||||||
WCHAR szFileSystemName[10];
|
WCHAR szFileSystemName[10];
|
||||||
DWORD dwSerialNumber = 0;
|
DWORD dwSerialNumber = 0;
|
||||||
DWORD dwMaxFileNameLength = 0;
|
DWORD dwMaxFileNameLength = 0;
|
||||||
DWORD dwFileSystemFlags = 0;
|
DWORD dwFileSystemFlags = 0;
|
||||||
|
|
||||||
if(::GetVolumeInformationW(unit.c_str(),
|
if (::GetVolumeInformationW(unit.c_str(),
|
||||||
szVolumeName,
|
szVolumeName,
|
||||||
sizeof(szVolumeName),
|
sizeof(szVolumeName),
|
||||||
&dwSerialNumber,
|
&dwSerialNumber,
|
||||||
&dwMaxFileNameLength,
|
&dwMaxFileNameLength,
|
||||||
&dwFileSystemFlags,
|
&dwFileSystemFlags,
|
||||||
szFileSystemName,
|
szFileSystemName,
|
||||||
sizeof(szFileSystemName)) == TRUE) {
|
sizeof(szFileSystemName)) == TRUE) {
|
||||||
|
|
||||||
return String(szFileSystemName);
|
return String(szFileSystemName);
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,6 @@ public:
|
|||||||
|
|
||||||
virtual String get_filesystem_type() const;
|
virtual String get_filesystem_type() const;
|
||||||
|
|
||||||
|
|
||||||
DirAccessWindows();
|
DirAccessWindows();
|
||||||
~DirAccessWindows();
|
~DirAccessWindows();
|
||||||
};
|
};
|
||||||
|
@ -1810,13 +1810,11 @@ EditorFileSystem::EditorFileSystem() {
|
|||||||
da->make_dir("res://.import");
|
da->make_dir("res://.import");
|
||||||
}
|
}
|
||||||
//this should probably also work on Unix and use the string it returns for FAT32
|
//this should probably also work on Unix and use the string it returns for FAT32
|
||||||
using_fat_32 = da->get_filesystem_type()=="FAT32";
|
using_fat_32 = da->get_filesystem_type() == "FAT32";
|
||||||
memdelete(da);
|
memdelete(da);
|
||||||
|
|
||||||
scan_total = 0;
|
scan_total = 0;
|
||||||
update_script_classes_queued = false;
|
update_script_classes_queued = false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorFileSystem::~EditorFileSystem() {
|
EditorFileSystem::~EditorFileSystem() {
|
||||||
|
@ -217,7 +217,6 @@ String DirAccessJAndroid::get_filesystem_type() const {
|
|||||||
return "APK";
|
return "APK";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//FileType get_file_type() const;
|
//FileType get_file_type() const;
|
||||||
size_t DirAccessJAndroid::get_space_left() {
|
size_t DirAccessJAndroid::get_space_left() {
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
|
|||||||
|
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
ERR_PRINT("Animation corrupted (invalid track type");
|
ERR_PRINT("Animation corrupted (invalid track type)");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user