Windows build fixes and warning avoidance

This commit is contained in:
Jack Andersen
2018-05-24 20:37:27 -10:00
parent e3c936648b
commit 77c7daa67c
8 changed files with 20 additions and 25 deletions

View File

@@ -47,12 +47,8 @@ public:
size_t m_fileSz;
bool m_isDir;
private:
friend class DirectoryEnumerator;
Entry(SystemString&& path, const SystemChar* name, size_t sz, bool isDir)
: m_path(std::move(path)), m_name(name), m_fileSz(sz), m_isDir(isDir)
{
}
Entry(const SystemString& path, const SystemChar* name, size_t sz, bool isDir)
: m_path(path), m_name(name), m_fileSz(sz), m_isDir(isDir) {}
};
private:

View File

@@ -14,16 +14,16 @@ class Listener;
using Vector3f = float[3];
static float Dot(const Vector3f& a, const Vector3f& b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; }
static inline float Dot(const Vector3f& a, const Vector3f& b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; }
static float Length(const Vector3f& a)
static inline float Length(const Vector3f& a)
{
if (std::fabs(a[0]) <= FLT_EPSILON && std::fabs(a[1]) <= FLT_EPSILON && std::fabs(a[2]) <= FLT_EPSILON)
return 0.f;
return std::sqrt(Dot(a, a));
}
static float Normalize(Vector3f& out)
static inline float Normalize(Vector3f& out)
{
float dist = Length(out);
if (dist == 0.f)

View File

@@ -320,7 +320,7 @@ public:
if (!m_extCtrlVals)
{
if (m_ctrlValsSelf)
m_ctrlValsSelf[ctrl];
return m_ctrlValsSelf[ctrl];
return 0;
}
return m_extCtrlVals[ctrl];