mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
fixing a few warnings
This commit is contained in:
parent
b2f72a645a
commit
8d6bd102f5
|
@ -185,7 +185,7 @@ namespace Blah
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int n = 0; n < m_size; n++)
|
for (auto n = 0; n < m_size; n++)
|
||||||
{
|
{
|
||||||
new (new_buffer + n) T(std::move(m_buffer[n]));
|
new (new_buffer + n) T(std::move(m_buffer[n]));
|
||||||
m_buffer[n].~T();
|
m_buffer[n].~T();
|
||||||
|
@ -203,12 +203,12 @@ namespace Blah
|
||||||
if (new_size > m_size)
|
if (new_size > m_size)
|
||||||
{
|
{
|
||||||
reserve(new_size);
|
reserve(new_size);
|
||||||
for (int n = m_size; n < new_size; n++)
|
for (auto n = m_size; n < new_size; n++)
|
||||||
new (m_buffer + n) T();
|
new (m_buffer + n) T();
|
||||||
}
|
}
|
||||||
else if (new_size < m_size)
|
else if (new_size < m_size)
|
||||||
{
|
{
|
||||||
for (int i = new_size; i < m_size; i ++)
|
for (auto i = new_size; i < m_size; i ++)
|
||||||
m_buffer[i].~T();
|
m_buffer[i].~T();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ namespace Blah
|
||||||
T* Vector<T>::expand(size_t amount)
|
T* Vector<T>::expand(size_t amount)
|
||||||
{
|
{
|
||||||
reserve(m_size + amount);
|
reserve(m_size + amount);
|
||||||
for (int n = m_size; n < m_size + amount; n++)
|
for (auto n = m_size; n < m_size + amount; n++)
|
||||||
new (m_buffer + n) T();
|
new (m_buffer + n) T();
|
||||||
m_size += amount;
|
m_size += amount;
|
||||||
return (m_buffer + m_size - amount);
|
return (m_buffer + m_size - amount);
|
||||||
|
@ -291,7 +291,7 @@ namespace Blah
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = index; i < m_size - 1; i++)
|
for (auto i = index; i < m_size - 1; i++)
|
||||||
m_buffer[i] = std::move(m_buffer[i + 1]);
|
m_buffer[i] = std::move(m_buffer[i + 1]);
|
||||||
m_buffer[m_size - 1].~T();
|
m_buffer[m_size - 1].~T();
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,12 +84,12 @@ namespace
|
||||||
{ \
|
{ \
|
||||||
m_batch.elements += 2; \
|
m_batch.elements += 2; \
|
||||||
int* _i = m_indices.expand(6); \
|
int* _i = m_indices.expand(6); \
|
||||||
*_i++ = m_vertices.size() + 0; \
|
*_i++ = (int)m_vertices.size() + 0; \
|
||||||
*_i++ = m_vertices.size() + 1; \
|
*_i++ = (int)m_vertices.size() + 1; \
|
||||||
*_i++ = m_vertices.size() + 2; \
|
*_i++ = (int)m_vertices.size() + 2; \
|
||||||
*_i++ = m_vertices.size() + 0; \
|
*_i++ = (int)m_vertices.size() + 0; \
|
||||||
*_i++ = m_vertices.size() + 2; \
|
*_i++ = (int)m_vertices.size() + 2; \
|
||||||
*_i++ = m_vertices.size() + 3; \
|
*_i++ = (int)m_vertices.size() + 3; \
|
||||||
Vertex* _v = m_vertices.expand(4); \
|
Vertex* _v = m_vertices.expand(4); \
|
||||||
MAKE_VERTEX(_v, m_matrix, px0, py0, tx0, ty0, col0, mult, fill, wash); _v++; \
|
MAKE_VERTEX(_v, m_matrix, px0, py0, tx0, ty0, col0, mult, fill, wash); _v++; \
|
||||||
MAKE_VERTEX(_v, m_matrix, px1, py1, tx1, ty1, col1, mult, fill, wash); _v++; \
|
MAKE_VERTEX(_v, m_matrix, px1, py1, tx1, ty1, col1, mult, fill, wash); _v++; \
|
||||||
|
@ -101,9 +101,9 @@ namespace
|
||||||
{ \
|
{ \
|
||||||
m_batch.elements += 1; \
|
m_batch.elements += 1; \
|
||||||
int* _i = m_indices.expand(3); \
|
int* _i = m_indices.expand(3); \
|
||||||
*_i++ = m_vertices.size() + 0; \
|
*_i++ = (int)m_vertices.size() + 0; \
|
||||||
*_i++ = m_vertices.size() + 1; \
|
*_i++ = (int)m_vertices.size() + 1; \
|
||||||
*_i++ = m_vertices.size() + 2; \
|
*_i++ = (int)m_vertices.size() + 2; \
|
||||||
Vertex* _v = m_vertices.expand(3); \
|
Vertex* _v = m_vertices.expand(3); \
|
||||||
MAKE_VERTEX(_v, m_matrix, px0, py0, tx0, ty0, col0, mult, fill, wash); _v++; \
|
MAKE_VERTEX(_v, m_matrix, px0, py0, tx0, ty0, col0, mult, fill, wash); _v++; \
|
||||||
MAKE_VERTEX(_v, m_matrix, px1, py1, tx1, ty1, col1, mult, fill, wash); _v++; \
|
MAKE_VERTEX(_v, m_matrix, px1, py1, tx1, ty1, col1, mult, fill, wash); _v++; \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user