mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-29 17:08:56 +08:00
few warning fixes
This commit is contained in:
parent
16626876e7
commit
088e3a9103
|
@ -184,7 +184,7 @@ namespace Blah
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = index; i < m_size - 1; i++)
|
for (auto i = index; i < m_size - 1; i++)
|
||||||
begin()[i] = std::move(begin()[i + 1]);
|
begin()[i] = std::move(begin()[i + 1]);
|
||||||
begin()[m_size - 1].~T();
|
begin()[m_size - 1].~T();
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ void Material::set_value(const char* name, const float* value, int64_t length)
|
||||||
|
|
||||||
if (strcmp(uniform.name, name) == 0)
|
if (strcmp(uniform.name, name) == 0)
|
||||||
{
|
{
|
||||||
size_t max = calc_uniform_size(uniform);
|
auto max = calc_uniform_size(uniform);
|
||||||
if (length > max)
|
if (length > max)
|
||||||
{
|
{
|
||||||
Log::warn("Exceeding length of Uniform '%s' (%i / %i)", name, length, max);
|
Log::warn("Exceeding length of Uniform '%s' (%i / %i)", name, length, max);
|
||||||
|
|
|
@ -37,10 +37,10 @@ namespace Blah
|
||||||
float abs(float x);
|
float abs(float x);
|
||||||
|
|
||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
T min(T a, U b) { return a < b ? a : b; }
|
T min(T a, U b) { return (T)(a < b ? a : b); }
|
||||||
|
|
||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
T max(T a, U b) { return a > b ? a : b; }
|
T max(T a, U b) { return (T)(a > b ? a : b); }
|
||||||
|
|
||||||
float floor(float x);
|
float floor(float x);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user