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:
Rémi Verschelde 2022-02-16 13:56:32 +01:00
parent f5b9cbaff6
commit b8b4580448
No known key found for this signature in database
GPG key ID: C3336907360768E1
137 changed files with 847 additions and 1269 deletions

View file

@ -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