mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
This commit is contained in:
parent
f5b9cbaff6
commit
b8b4580448
137 changed files with 847 additions and 1269 deletions
|
|
@ -57,8 +57,9 @@ String cwd() {
|
|||
|
||||
Char16String buffer;
|
||||
buffer.resize((int)expected_size);
|
||||
if (::GetCurrentDirectoryW(expected_size, (wchar_t *)buffer.ptrw()) == 0)
|
||||
if (::GetCurrentDirectoryW(expected_size, (wchar_t *)buffer.ptrw()) == 0) {
|
||||
return ".";
|
||||
}
|
||||
|
||||
String result;
|
||||
if (result.parse_utf16(buffer.ptr())) {
|
||||
|
|
@ -95,8 +96,9 @@ String realpath(const String &p_path) {
|
|||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
return p_path;
|
||||
}
|
||||
|
||||
const DWORD expected_size = ::GetFinalPathNameByHandleW(hFile, nullptr, 0, FILE_NAME_NORMALIZED);
|
||||
|
||||
|
|
@ -177,8 +179,9 @@ String relative_to_impl(const String &p_path, const String &p_relative_to) {
|
|||
#ifdef WINDOWS_ENABLED
|
||||
String get_drive_letter(const String &p_norm_path) {
|
||||
int idx = p_norm_path.find(":/");
|
||||
if (idx != -1 && idx < p_norm_path.find("/"))
|
||||
if (idx != -1 && idx < p_norm_path.find("/")) {
|
||||
return p_norm_path.substr(0, idx + 1);
|
||||
}
|
||||
return String();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue