diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-20 05:14:34 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-20 05:14:34 +0000 |
| commit | eb3ebcd9f568cfe6abb5c03fab0bb3af46be2704 (patch) | |
| tree | 3d365b1081bef7ab9d01efa679f6401bcdb9bbb9 | |
| parent | Added install rules for third-party libraries (diff) | |
| download | DiligentCore-eb3ebcd9f568cfe6abb5c03fab0bb3af46be2704.tar.gz DiligentCore-eb3ebcd9f568cfe6abb5c03fab0bb3af46be2704.zip | |
Fixed issue with WindowsFileSystem::CreateDirectory and WindowsFileSystem::DeleteFile; few updates to Vector implementation
| -rw-r--r-- | Common/interface/BasicMath.h | 12 | ||||
| -rw-r--r-- | Platforms/Win32/src/Win32FileSystem.cpp | 11 |
2 files changed, 11 insertions, 12 deletions
diff --git a/Common/interface/BasicMath.h b/Common/interface/BasicMath.h index 014eb3db..8826ca28 100644 --- a/Common/interface/BasicMath.h +++ b/Common/interface/BasicMath.h @@ -186,8 +186,8 @@ template <class T> struct Vector2 return reinterpret_cast<const T*>(this)[index]; } - explicit - Vector2(T _x = 0, T _y = 0) : x(_x), y(_y) { } + Vector2() : x(0), y(0) { } + Vector2(T _x, T _y) : x(_x), y(_y) { } }; template <class T> @@ -359,8 +359,8 @@ template <class T> struct Vector3 return reinterpret_cast<const T*>(this)[index]; } - explicit - Vector3(T _x = 0, T _y = 0, T _z = 0) : x(_x), y(_y), z(_z) { } + Vector3() : x(0), y(0), z(0) {} + Vector3(T _x, T _y, T _z) : x(_x), y(_y), z(_z) { } operator Vector2<T>()const{return Vector2<T>(x,y);} }; @@ -553,8 +553,8 @@ template <class T> struct Vector4 return reinterpret_cast<const T*>(this)[index]; } - explicit - Vector4(T _x = 0, T _y = 0, T _z = 0, T _w = 0) : x(_x), y(_y), z(_z), w(_w) { } + Vector4() : x(0), y(0), z(0), w(0) { } + Vector4(T _x, T _y, T _z, T _w) : x(_x), y(_y), z(_z), w(_w) { } }; diff --git a/Platforms/Win32/src/Win32FileSystem.cpp b/Platforms/Win32/src/Win32FileSystem.cpp index 2fb9a140..ad995c6d 100644 --- a/Platforms/Win32/src/Win32FileSystem.cpp +++ b/Platforms/Win32/src/Win32FileSystem.cpp @@ -21,7 +21,6 @@ * of the possibility of such damages. */ -#include <Shlwapi.h> #include "Win32FileSystem.h" #include "Errors.h" #include "../../Common/interface/StringTools.h" @@ -31,20 +30,20 @@ // Windows.h defines CreateDirectory and DeleteFile as macros. // So we need to do some tricks to avoid name mess. -bool CreateDirectoryImpl( const Diligent::Char *strPath ); +static bool CreateDirectoryImpl( const Diligent::Char *strPath ); bool WindowsFileSystem::CreateDirectory( const Diligent::Char *strPath ) { return CreateDirectoryImpl(strPath); } -void DeleteFileImpl( const Diligent::Char *strPath ); +static void DeleteFileImpl( const Diligent::Char *strPath ); void WindowsFileSystem::DeleteFile( const Diligent::Char *strPath ) { DeleteFileImpl(strPath); } #include <Windows.h> -#include "Shlwapi.h" +#include <Shlwapi.h> #pragma comment(lib, "Shlwapi.lib") using namespace Diligent; @@ -122,7 +121,7 @@ bool WindowsFileSystem::FileExists( const Char *strFilePath ) return Exists; } -bool CreateDirectoryImpl( const Char *strPath ) +static bool CreateDirectoryImpl( const Char *strPath ) { // Test all parent directories std::string DirectoryPath = strPath; @@ -174,7 +173,7 @@ void WindowsFileSystem::ClearDirectory( const Char *strPath ) } -void DeleteFileImpl( const Char *strPath ) +static void DeleteFileImpl( const Char *strPath ) { DeleteFileA(strPath); } |
