1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

compile fixes for apple clang

This commit is contained in:
fgenesis 2024-07-13 06:49:32 +02:00
parent a046038c33
commit 64c0c649cd
3 changed files with 18 additions and 15 deletions

View file

@ -7,7 +7,7 @@
// File : glm/core/type_half.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright:
// This half implementation is based on OpenEXR which is Copyright (c) 2002,
// This half implementation is based on OpenEXR which is Copyright (c) 2002,
// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
///////////////////////////////////////////////////////////////////////////////////////////////////
@ -20,7 +20,7 @@ namespace detail
{
volatile float f = 1e10;
for(int i = 0; i < 10; ++i)
for(int i = 0; i < 10; ++i)
f *= f; // this will overflow before
// the for­loop terminates
return f;
@ -116,9 +116,9 @@ namespace detail
// of float and half (127 versus 15).
//
register int s = (i >> 16) & 0x00008000;
register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
register int m = i & 0x007fffff;
int s = (i >> 16) & 0x00008000;
int e = ((i >> 23) & 0x000000ff) - (127 - 15);
int m = i & 0x007fffff;
//
// Now reassemble s, e and m into a half:
@ -144,7 +144,7 @@ namespace detail
// whose magnitude is less than __half_NRM_MIN.
//
// We convert f to a denormalized _halfGTX.
//
//
m = (m | 0x00800000) >> (1 - e);
@ -155,9 +155,9 @@ namespace detail
// our number normalized. Because of the way a half's bits
// are laid out, we don't have to treat this case separately;
// the code below will handle it correctly.
//
//
if(m & 0x00001000)
if(m & 0x00001000)
m += 0x00002000;
//
@ -183,7 +183,7 @@ namespace detail
// F is a NAN; we produce a half NAN that preserves
// the sign bit and the 10 leftmost bits of the
// significand of f, with one exception: If the 10
// leftmost bits are all zero, the NAN would turn
// leftmost bits are all zero, the NAN would turn
// into an infinity, so we have to set at least one
// bit in the significand.
//
@ -254,7 +254,7 @@ namespace detail
// return toFloat();
//}
GLM_FUNC_QUALIFIER thalf::operator float() const
GLM_FUNC_QUALIFIER thalf::operator float() const
{
return toFloat32(this->data);
}
@ -290,7 +290,7 @@ namespace detail
GLM_FUNC_QUALIFIER thalf& thalf::operator*=(thalf const & s)
{
data = toFloat16(toFloat32(data) * toFloat32(s.data));
data = toFloat16(toFloat32(data) * toFloat32(s.data));
return *this;
}

View file

@ -365,7 +365,7 @@ public:
const size_t n = this->n;
tbsp__ASSERT(n == o.n);
for(size_t i = 0; i < n; ++i)
s += a.p[i] * b.p[i];
s += p[i] * o.p[i];
return s;
}
@ -410,7 +410,9 @@ struct MatrixAcc
// and because math is backwards:
// (h x w) * (H x W) -> (h x W)
TBSP_ASSERT(size.w == o.size.h);
Size2d wh { o.size.w, size.h };
Size2d wh;
wh.w = o.size.w;
wh.h = size.h;
return wh;
}
@ -735,7 +737,7 @@ MatrixAcc<T> generateLeastSquares(T *mem, const MatrixAcc<T>& N)
{
MatrixAcc<T> M;
M.p = mem;
M.size == getLeastSquaresSize(N);
M.size = getLeastSquaresSize(N);
T * const pend = M.p + (M.size.w * M.size.h);
@ -974,7 +976,7 @@ void chordal(T *parm, const P *points, size_t n)
{
const T dist = distance(points[i-1], points[i]);
totaldist += dist;
parm[i] = totaldist
parm[i] = totaldist;
}
// Normalize to 0..1

View file

@ -2,6 +2,7 @@
#define TTVFS_DEBUG_H
#include "VFSDefines.h"
#include <stddef.h>
#include <iosfwd>
VFS_NAMESPACE_START