From 814ab59c372cf4c71147636ea7d5cb3bace883c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 25 Sep 2023 15:14:29 +0200 Subject: Windows: Remove `MSVC` define redundant with `_MSC_VER` Cleanup unused MSVC code in FileAccessUnix. --- drivers/unix/file_access_unix.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'drivers/unix/file_access_unix.cpp') diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index d28e0e70b8..ca5a13799e 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -39,18 +39,7 @@ #include #include #include - -#if defined(UNIX_ENABLED) #include -#endif - -#ifdef MSVC -#define S_ISREG(m) ((m)&_S_IFREG) -#include -#endif -#ifndef S_ISREG -#define S_ISREG(m) ((m)&S_IFREG) -#endif void FileAccessUnix::check_errors() const { ERR_FAIL_NULL_MSG(f, "File must be opened before use."); @@ -279,16 +268,10 @@ bool FileAccessUnix::file_exists(const String &p_path) { return false; } -#ifdef UNIX_ENABLED // See if we have access to the file if (access(filename.utf8().get_data(), F_OK)) { return false; } -#else - if (_access(filename.utf8().get_data(), 4) == -1) { - return false; - } -#endif // See if this is a regular file switch (st.st_mode & S_IFMT) { -- cgit v1.2.3