diff --git a/openVulkanoCpp/IO/Archive/LibArchiveHelper.hpp b/openVulkanoCpp/IO/Archive/LibArchiveHelper.hpp index 9b71d82..78c1d1c 100644 --- a/openVulkanoCpp/IO/Archive/LibArchiveHelper.hpp +++ b/openVulkanoCpp/IO/Archive/LibArchiveHelper.hpp @@ -13,9 +13,27 @@ namespace openVulkanoCpp { +#ifdef _MSC_VER + using mode_t = unsigned short; + using ssize_t = int64_t; +#endif + namespace LibArchiveHelper { - constexpr mode_t FILE_TYPE_MAP[] = { AE_IFMT, AE_IFREG, AE_IFDIR, AE_IFLNK, AE_IFBLK, AE_IFCHR, AE_IFIFO, AE_IFSOCK, AE_IFMT }; + constexpr mode_t GetFileType(std::filesystem::file_type type) + { + switch (type) + { + case std::filesystem::file_type::regular: return AE_IFREG; + case std::filesystem::file_type::directory: return AE_IFDIR; + case std::filesystem::file_type::symlink: return AE_IFLNK; + case std::filesystem::file_type::block: return AE_IFBLK; + case std::filesystem::file_type::character: return AE_IFCHR; + case std::filesystem::file_type::fifo: return AE_IFIFO; + case std::filesystem::file_type::socket: return AE_IFSOCK; + } + return AE_IFMT; + } constexpr std::filesystem::file_type GetFileType(mode_t type) { @@ -32,11 +50,6 @@ namespace openVulkanoCpp return std::filesystem::file_type::unknown; } - constexpr mode_t GetFileType(std::filesystem::file_type type) - { - return FILE_TYPE_MAP[static_cast(type)]; - } - template inline ssize_t CopyArchiveData(struct archive* archiveReader, struct archive* archiveWriter) { diff --git a/openVulkanoCpp/Math/Frustum.hpp b/openVulkanoCpp/Math/Frustum.hpp index 0526b55..9b9ff64 100644 --- a/openVulkanoCpp/Math/Frustum.hpp +++ b/openVulkanoCpp/Math/Frustum.hpp @@ -8,6 +8,13 @@ #include "Math.hpp" +#ifdef NEAR +#undef NEAR +#endif +#ifdef FAR +#undef FAR +#endif + namespace openVulkanoCpp::Math { class Frustum