few warning fixes

This commit is contained in:
Noel Berry 2020-10-24 15:37:07 -07:00
parent 16626876e7
commit 088e3a9103
3 changed files with 4 additions and 4 deletions

View File

@ -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();
} }

View File

@ -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);

View File

@ -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);