mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-08 21:17:49 +00:00
Windows build fixes and warning avoidance
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
if (!m_extCtrlVals)
|
||||
{
|
||||
if (m_ctrlValsSelf)
|
||||
m_ctrlValsSelf[ctrl];
|
||||
return m_ctrlValsSelf[ctrl];
|
||||
return 0;
|
||||
}
|
||||
return m_extCtrlVals[ctrl];
|
||||
|
||||
Reference in New Issue
Block a user